aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/vc4/vc4_drv.c
diff options
context:
space:
mode:
authorMarkus Elfring <elfring@users.sourceforge.net>2016-07-15 21:15:37 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2016-07-18 09:11:28 +0200
commit63fe9bb8656501d33e304bd0d45125a6b1b878f7 (patch)
tree259b95428f1963d3ce8771fb3ee85d8a425401bd /drivers/gpu/drm/vc4/vc4_drv.c
parentdrm/rockchip: Delete an unnecessary check before drm_gem_object_unreference_unlocked() (diff)
downloadlinux-dev-63fe9bb8656501d33e304bd0d45125a6b1b878f7.tar.xz
linux-dev-63fe9bb8656501d33e304bd0d45125a6b1b878f7.zip
drm/vc4: Delete unnecessary checks before two function calls
The following functions test whether their argument is NULL and then return immediately. * drm_fbdev_cma_hotplug_event * drm_fbdev_cma_restore_mode Thus the tests around their calls are 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/fb33d930-6a5c-c501-6676-26bd486f1cb5@users.sourceforge.net
Diffstat (limited to 'drivers/gpu/drm/vc4/vc4_drv.c')
-rw-r--r--drivers/gpu/drm/vc4/vc4_drv.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c
index 9e88231b8906..493bb580a413 100644
--- a/drivers/gpu/drm/vc4/vc4_drv.c
+++ b/drivers/gpu/drm/vc4/vc4_drv.c
@@ -47,8 +47,7 @@ static void vc4_lastclose(struct drm_device *dev)
{
struct vc4_dev *vc4 = to_vc4_dev(dev);
- if (vc4->fbdev)
- drm_fbdev_cma_restore_mode(vc4->fbdev);
+ drm_fbdev_cma_restore_mode(vc4->fbdev);
}
static const struct file_operations vc4_drm_fops = {