Skip to content

Commit 3f3a728

Browse files
elfringpH5
authored andcommitted
GPU-DRM-IMX: Delete an unnecessary check before drm_fbdev_cma_restore_mode()
The drm_fbdev_cma_restore_mode() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
1 parent 407c9eb commit 3f3a728

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/gpu/drm/imx/imx-drm-core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,7 @@ static void imx_drm_driver_lastclose(struct drm_device *drm)
6363
#if IS_ENABLED(CONFIG_DRM_IMX_FB_HELPER)
6464
struct imx_drm_device *imxdrm = drm->dev_private;
6565

66-
if (imxdrm->fbhelper)
67-
drm_fbdev_cma_restore_mode(imxdrm->fbhelper);
66+
drm_fbdev_cma_restore_mode(imxdrm->fbhelper);
6867
#endif
6968
}
7069

0 commit comments

Comments
 (0)