drm/rockchip: Remove unnecessary checking
authorGuoqing Jiang <guoqing.jiang@canonical.com>
Fri, 6 Dec 2024 11:42:33 +0000 (19:42 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Wed, 11 Dec 2024 22:38:03 +0000 (23:38 +0100)
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>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20241206114233.1270989-1-guoqing.jiang@canonical.com
drivers/gpu/drm/rockchip/rockchip_drm_drv.c

index a55be34e45bd46acbf85b33d00a6f430ceed0dfd..532aaa94c3c526d3f598704dad4e43512da0dc06 100644 (file)
@@ -486,8 +486,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[] = {