[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220401142536.1948161-71-sashal@kernel.org>
Date: Fri, 1 Apr 2022 10:24:18 -0400
From: Sasha Levin <sashal@...nel.org>
To: linux-kernel@...r.kernel.org, stable@...r.kernel.org
Cc: Kevin Tang <kevin3.tang@...il.com>,
Dan Carpenter <dan.carpenter@...cle.com>,
Javier Martinez Canillas <javierm@...hat.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Sasha Levin <sashal@...nel.org>, airlied@...ux.ie,
daniel@...ll.ch, orsonzhai@...il.com, baolin.wang7@...il.com,
zhang.lyra@...il.com, maarten.lankhorst@...ux.intel.com,
yong.wu@...iatek.com, etom@...l.co.jp,
dri-devel@...ts.freedesktop.org
Subject: [PATCH AUTOSEL 5.17 071/149] drm/sprd: fix potential NULL dereference
From: Kevin Tang <kevin3.tang@...il.com>
[ Upstream commit 8668658aebb0a19d877d5a81c004baf716c4aaa6 ]
'drm' could be null in sprd_drm_shutdown, and drm_warn maybe dereference
it, remove this warning log.
Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: Kevin Tang <kevin3.tang@...il.com>
Reviewed-by: Javier Martinez Canillas <javierm@...hat.com>
Acked-by: Thomas Zimmermann <tzimmermann@...e.de>
Link: https://lore.kernel.org/all/20220117084044.9210-1-kevin3.tang@gmail.com
v1 -> v2:
- Split checking platform_get_resource() return value to a separate patch
- Use dev_warn() instead of removing the warning log
Signed-off-by: Sasha Levin <sashal@...nel.org>
---
drivers/gpu/drm/sprd/sprd_drm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/sprd/sprd_drm.c b/drivers/gpu/drm/sprd/sprd_drm.c
index a077e2d4d721..af2be97d5ed0 100644
--- a/drivers/gpu/drm/sprd/sprd_drm.c
+++ b/drivers/gpu/drm/sprd/sprd_drm.c
@@ -155,7 +155,7 @@ static void sprd_drm_shutdown(struct platform_device *pdev)
struct drm_device *drm = platform_get_drvdata(pdev);
if (!drm) {
- drm_warn(drm, "drm device is not available, no shutdown\n");
+ dev_warn(&pdev->dev, "drm device is not available, no shutdown\n");
return;
}
--
2.34.1
Powered by blists - more mailing lists