[bug report] drm/i915/hdmi: Use connector->ddc everwhere

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Ville Syrjälä,

This is a semi-automatic email about new static checker warnings.

The patch e046d1562491: "drm/i915/hdmi: Use connector->ddc everwhere"
from Aug 29, 2023, leads to the following Smatch complaint:

    drivers/gpu/drm/i915/display/intel_ddi.c:4336 intel_hdmi_reset_link()
    warn: variable dereferenced before check 'connector' (see line 4329)

drivers/gpu/drm/i915/display/intel_ddi.c
  4328		struct intel_connector *connector = hdmi->attached_connector;
  4329		struct i2c_adapter *ddc = connector->base.ddc;
                                          ^^^^^^^^^^^^^^^^^^^
The patch introduces a new dereference

  4330		struct drm_connector_state *conn_state;
  4331		struct intel_crtc_state *crtc_state;
  4332		struct intel_crtc *crtc;
  4333		u8 config;
  4334		int ret;
  4335	
  4336		if (!connector || connector->base.status != connector_status_connected)
                     ^^^^^^^^^
Checked too late.

  4337			return 0;
  4338	

regards,
dan carpenter



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux