[bug report] drm/rockchip: add an common abstracted PSR driver

Dan Carpenter dan.carpenter at oracle.com
Thu Oct 13 02:26:06 PDT 2016


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



More information about the Linux-rockchip mailing list