diff mbox series

drm/rockchip: Remove unnecessary checking

Message ID 20241206114233.1270989-1-guoqing.jiang@canonical.com (mailing list archive)
State New
Headers show
Series drm/rockchip: Remove unnecessary checking | expand

Commit Message

Guoqing Jiang Dec. 6, 2024, 11:42 a.m. UTC
It is not needed since drm_atomic_helper_shutdown checks it.

Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com>
---
 drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Andy Yan Dec. 6, 2024, 12:08 p.m. UTC | #1
Hi Guoqing,

At 2024-12-06 19:42:33, "Guoqing Jiang" <guoqing.jiang@canonical.com> wrote:
>It is not needed since drm_atomic_helper_shutdown checks it.
>
>Signed-off-by: Guoqing Jiang <guoqing.jiang@canonical.com>

   Acked-by: Andy Yan<andyshrk@163.com>

Thanks

>---
> drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
>diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>index 585355de696b..64f5f547fb7a 100644
>--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
>@@ -488,8 +488,7 @@ static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
> {
> 	struct drm_device *drm = platform_get_drvdata(pdev);
> 
>-	if (drm)
>-		drm_atomic_helper_shutdown(drm);
>+	drm_atomic_helper_shutdown(drm);
> }
> 
> static const struct of_device_id rockchip_drm_dt_ids[] = {
>-- 
>2.35.3
>
>
>_______________________________________________
>Linux-rockchip mailing list
>Linux-rockchip@lists.infradead.org
>http://lists.infradead.org/mailman/listinfo/linux-rockchip
Heiko Stübner Dec. 11, 2024, 10:45 p.m. UTC | #2
On Fri, 06 Dec 2024 19:42:33 +0800, Guoqing Jiang wrote:
> It is not needed since drm_atomic_helper_shutdown checks it.
> 
> 

Applied, thanks!

[1/1] drm/rockchip: Remove unnecessary checking
      commit: 8ddc8dfb8329349d5efb0418c9f20025333e2d98

Best regards,
diff mbox series

Patch

diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
index 585355de696b..64f5f547fb7a 100644
--- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
+++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c
@@ -488,8 +488,7 @@  static void rockchip_drm_platform_shutdown(struct platform_device *pdev)
 {
 	struct drm_device *drm = platform_get_drvdata(pdev);
 
-	if (drm)
-		drm_atomic_helper_shutdown(drm);
+	drm_atomic_helper_shutdown(drm);
 }
 
 static const struct of_device_id rockchip_drm_dt_ids[] = {