提交 63fe9bb8 编写于 作者: M Markus Elfring 提交者: Daniel Vetter

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: NMarkus Elfring <elfring@users.sourceforge.net>
Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/fb33d930-6a5c-c501-6676-26bd486f1cb5@users.sourceforge.net
上级 d37e2a15
...@@ -47,7 +47,6 @@ static void vc4_lastclose(struct drm_device *dev) ...@@ -47,7 +47,6 @@ static void vc4_lastclose(struct drm_device *dev)
{ {
struct vc4_dev *vc4 = to_vc4_dev(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);
} }
......
...@@ -26,7 +26,6 @@ static void vc4_output_poll_changed(struct drm_device *dev) ...@@ -26,7 +26,6 @@ static void vc4_output_poll_changed(struct drm_device *dev)
{ {
struct vc4_dev *vc4 = to_vc4_dev(dev); struct vc4_dev *vc4 = to_vc4_dev(dev);
if (vc4->fbdev)
drm_fbdev_cma_hotplug_event(vc4->fbdev); drm_fbdev_cma_hotplug_event(vc4->fbdev);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册