drm/atmel-hlcdc: Remove unnecessary NULL check
authorThierry Reding <treding@nvidia.com>
Wed, 29 Mar 2017 14:44:00 +0000 (16:44 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 21 Jun 2017 13:38:26 +0000 (15:38 +0200)
drm_fbdev_cma_hotplug_event() already checks for NULL pointers before
dereferencing, so callers don't need to do that.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170329144401.1804-11-thierry.reding@gmail.com
drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c

index 30dbffd..51d22ad 100644 (file)
@@ -451,8 +451,7 @@ static void atmel_hlcdc_fb_output_poll_changed(struct drm_device *dev)
 {
        struct atmel_hlcdc_dc *dc = dev->dev_private;
 
-       if (dc->fbdev)
-               drm_fbdev_cma_hotplug_event(dc->fbdev);
+       drm_fbdev_cma_hotplug_event(dc->fbdev);
 }
 
 struct atmel_hlcdc_dc_commit {