Re: [PATCH] drm/msm: remove unnecessary NULL check

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

 



Hello,

On Fri, Oct 13, 2023 at 10:17:08AM +0300, Dan Carpenter wrote:
> This NULL check was required when it was added, but we shuffled the code
> around in commit 1f50db2f3e1e ("drm/msm/mdp5: move resource allocation
> to the _probe function") and now it's not.  The inconsistent NULL
> checking triggers a Smatch warning:
> 
>     drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:847 mdp5_init() warn:
>     variable dereferenced before check 'mdp5_kms' (see line 782)
> 
> Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx>

LGTM

Reviewed-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx>

This patch opportunity is valid since commit 1f50db2f3e1e
("drm/msm/mdp5: move resource allocation to the _probe function") but
applies to older trees (where it introduces a bug).
On one hand it's not really a fix, but maybe still add a Fixes: line to
ensure it's not backported to older stables? Hmm, I don't know.

Best regards
Uwe

-- 
Pengutronix e.K.                           | Uwe Kleine-König            |
Industrial Linux Solutions                 | https://www.pengutronix.de/ |

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux