Skip to content

Commit 56466f6

Browse files
Dan CarpenterAbhinav Kumar
authored andcommitted
drm/msm: remove unnecessary NULL check
This NULL check was required when it was added, but we shuffled the code around 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) Fixes: 1f50db2 ("drm/msm/mdp5: move resource allocation to the _probe function") Signed-off-by: Dan Carpenter <[email protected]> Reviewed-by: Uwe Kleine-König <[email protected]> Reviewed-by: Dmitry Baryshkov <[email protected]> Reviewed-by: Abhinav Kumar <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/562559/ Link: https://lore.kernel.org/r/ZSj+6/J6YsoSpLak@kadam Signed-off-by: Abhinav Kumar <[email protected]>
1 parent 2113326 commit 56466f6

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -844,8 +844,7 @@ static int mdp5_init(struct platform_device *pdev, struct drm_device *dev)
844844

845845
return 0;
846846
fail:
847-
if (mdp5_kms)
848-
mdp5_destroy(mdp5_kms);
847+
mdp5_destroy(mdp5_kms);
849848
return ret;
850849
}
851850

0 commit comments

Comments
 (0)