dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: alexander.deucher@amd.com
Cc: dri-devel@lists.freedesktop.org
Subject: re: drm/radeon: implement output csc property for DCE5+
Date: Tue, 24 Mar 2015 21:13:52 +0300	[thread overview]
Message-ID: <20150324181352.GA6797@mwanda> (raw)

Hello Alex Deucher,

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

The patch 643b1f5629a3: "drm/radeon: implement output csc property 
for DCE5+" from Feb 23, 2015, leads to the following Smatch complaint:

drivers/gpu/drm/radeon/radeon_connectors.c:763 radeon_connector_set_property()
	 error: we previously assumed 'connector->encoder' could be null (see line 751)

drivers/gpu/drm/radeon/radeon_connectors.c
   750		if (property == rdev->mode_info.output_csc_property) {
   751			if (connector->encoder)
                            ^^^^^^^^^^^^^^^^^^
Check.

   752				radeon_encoder = to_radeon_encoder(connector->encoder);
   753			else {
   754				struct drm_connector_helper_funcs *connector_funcs = connector->helper_private;
   755				radeon_encoder = to_radeon_encoder(connector_funcs->best_encoder(connector));
   756			}
   757	
   758			if (radeon_encoder->output_csc == val)
   759				return 0;
   760	
   761			radeon_encoder->output_csc = val;
   762	
   763			if (connector->encoder->crtc) {
                            ^^^^^^^^^^^^^^^^^^
Unchecked dereference.

   764				struct drm_crtc *crtc  = connector->encoder->crtc;
   765				struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;

regards,
dan carpenter
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

                 reply	other threads:[~2015-03-24 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150324181352.GA6797@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=alexander.deucher@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox