diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-05-28 12:02:44 +0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2019-06-12 21:28:21 +0300 |
commit | 34f31f14c477f3c27e0fa0899db1bb6648cf53ca (patch) | |
tree | be9ae6084394dc3aa6a1316c0598dc3897c1000e /drivers/video | |
parent | 1e16eaebe2ea777a19b13cd1916992b544874d42 (diff) | |
download | linux-34f31f14c477f3c27e0fa0899db1bb6648cf53ca.tar.xz |
fbdev: sysfs files can't disappear before the device is gone
Which means lock_fb_info can never fail. Remove the error handling.
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: Rob Clark <robdclark@gmail.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-14-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/fbdev/core/fbsysfs.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/drivers/video/fbdev/core/fbsysfs.c b/drivers/video/fbdev/core/fbsysfs.c index 954ed99e80da..f80d5b3a7797 100644 --- a/drivers/video/fbdev/core/fbsysfs.c +++ b/drivers/video/fbdev/core/fbsysfs.c @@ -175,10 +175,7 @@ static ssize_t store_modes(struct device *device, return -EINVAL; console_lock(); - if (!lock_fb_info(fb_info)) { - console_unlock(); - return -ENODEV; - } + lock_fb_info(fb_info); list_splice(&fb_info->modelist, &old_list); fb_videomode_to_modelist((const struct fb_videomode *)buf, i, @@ -405,10 +402,7 @@ static ssize_t store_fbstate(struct device *device, state = simple_strtoul(buf, &last, 0); console_lock(); - if (!lock_fb_info(fb_info)) { - console_unlock(); - return -ENODEV; - } + lock_fb_info(fb_info); fb_set_suspend(fb_info, (int)state); |