GPU-DRM-sun4i: Delete an unnecessary check before drm_fbdev_cma_hotplug_event()
authorMarkus Elfring <elfring@users.sourceforge.net>
Wed, 20 Jul 2016 16:32:34 +0000 (18:32 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 20 Jul 2016 17:47:35 +0000 (19:47 +0200)
The drm_fbdev_cma_hotplug_event() 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: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/cd959d92-f7d9-598c-421f-d3f40bedee10@users.sourceforge.net
drivers/gpu/drm/sun4i/sun4i_framebuffer.c

index a0b30c216a5bf5a96a2077eb10282102bfa0f5a7..70688febd7ac8b08ee064ffcaabef506e63515eb 100644 (file)
@@ -20,8 +20,7 @@ static void sun4i_de_output_poll_changed(struct drm_device *drm)
 {
        struct sun4i_drv *drv = drm->dev_private;
 
-       if (drv->fbdev)
-               drm_fbdev_cma_hotplug_event(drv->fbdev);
+       drm_fbdev_cma_hotplug_event(drv->fbdev);
 }
 
 static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {