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
This commit is contained in:
Родитель
d37e2a150e
Коммит
63fe9bb865
|
@ -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 = {
|
||||
|
|
|
@ -26,8 +26,7 @@ static void vc4_output_poll_changed(struct drm_device *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);
|
||||
}
|
||||
|
||||
struct vc4_commit {
|
||||
|
|
Загрузка…
Ссылка в новой задаче