public inbox for linux-rockchip@lists.infradead.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
To: ykk-TNX95d0MmH7DzftRWevZcw@public.gmane.org
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org
Subject: [bug report] drm/rockchip: add an common abstracted PSR driver
Date: Thu, 13 Oct 2016 12:26:06 +0300	[thread overview]
Message-ID: <20161013092606.GA23977@mwanda> (raw)

Hello Yakir Yang,

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

The patch 5182c1a556d7: "drm/rockchip: add an common abstracted PSR 
driver" from Jul 24, 2016, leads to the following Smatch complaint:

drivers/gpu/drm/rockchip/rockchip_drm_psr.c:228 rockchip_drm_psr_register()
	 warn: variable dereferenced before check 'encoder' (see line 224)

drivers/gpu/drm/rockchip/rockchip_drm_psr.c
   223	{
   224		struct rockchip_drm_private *drm_drv = encoder->dev->dev_private;
                                                       ^^^^^^^^^
Dereference.

   225		struct psr_drv *psr;
   226		unsigned long flags;
   227	
   228		if (!encoder || !psr_set)
                     ^^^^^^^
Check.

   229			return -EINVAL;
   230	

regards,
dan carpenter

                 reply	other threads:[~2016-10-13  9:26 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=20161013092606.GA23977@mwanda \
    --to=dan.carpenter-qhclzuegtsvqt0dzr+alfa@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=ykk-TNX95d0MmH7DzftRWevZcw@public.gmane.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