All of lore.kernel.org
 help / color / mirror / Atom feed
* re: drm/radeon/kms: improve bpc handling (v2)
@ 2012-07-19 19:29 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-07-19 19:29 UTC (permalink / raw)
  To: alexander.deucher; +Cc: dri-devel

Hello Alex Deucher,

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

The patch eccea7920cfb: "drm/radeon/kms: improve bpc handling (v2)" 
from Mar 26, 2012, leads to the following Smatch complaint:

drivers/gpu/drm/radeon/atombios_crtc.c:599 atombios_adjust_pll()
	 warn: variable dereferenced before check 'connector' (see line 594)

drivers/gpu/drm/radeon/atombios_crtc.c
   593				connector = radeon_get_connector_for_encoder(encoder);
   594				bpc = radeon_get_monitor_bpc(connector);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
New dereference inside the call to radeon_get_monitor_bpc().

   595				encoder_mode = atombios_get_encoder_mode(encoder);
   596				is_duallink = radeon_dig_monitor_is_duallink(encoder, mode->clock);
   597				if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
   598				    (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) {
   599					if (connector) {
                                            ^^^^^^^^^
Old check.

   600						struct radeon_connector *radeon_connector = to_radeon_connector(connector);
   601						struct radeon_connector_atom_dig *dig_connector =

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread
* re: drm/radeon/kms: improve bpc handling (v2)
@ 2012-05-13 15:31 Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2012-05-13 15:31 UTC (permalink / raw)
  To: alexander.deucher; +Cc: dri-devel

Hello Alex Deucher,

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

The patch eccea7920cfb: "drm/radeon/kms: improve bpc handling (v2)" 
from Mar 26, 2012, leads to the following Smatch complaint:

drivers/gpu/drm/radeon/atombios_crtc.c:599 atombios_adjust_pll()
	 warn: variable dereferenced before check 'connector' (see line 594)

drivers/gpu/drm/radeon/atombios_crtc.c
   593				connector = radeon_get_connector_for_encoder(encoder);
   594				bpc = radeon_get_monitor_bpc(connector);
                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
"connector" is dereferenced inside the call to radeon_get_monitor_bpc().
New in this patch.

   595				encoder_mode = atombios_get_encoder_mode(encoder);
   596				is_duallink = radeon_dig_monitor_is_duallink(encoder, mode->clock);
   597				if ((radeon_encoder->devices & (ATOM_DEVICE_LCD_SUPPORT | ATOM_DEVICE_DFP_SUPPORT)) ||
   598				    (radeon_encoder_get_dp_bridge_encoder_id(encoder) != ENCODER_OBJECT_ID_NONE)) {
   599					if (connector) {
                                            ^^^^^^^^^
Old check.

   600						struct radeon_connector *radeon_connector = to_radeon_connector(connector);
   601						struct radeon_connector_atom_dig *dig_connector =

regards,
dan carpenter

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-07-19 19:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-19 19:29 drm/radeon/kms: improve bpc handling (v2) Dan Carpenter
  -- strict thread matches above, loose matches on Subject: below --
2012-05-13 15:31 Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.