Commit 1e16eaeb authored by Daniel Vetter's avatar Daniel Vetter

fbdev/omap: 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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190528090304.9388-13-daniel.vetter@ffwll.ch
parent 0fe66f32
...@@ -60,8 +60,7 @@ static ssize_t store_rotate_type(struct device *dev, ...@@ -60,8 +60,7 @@ static ssize_t store_rotate_type(struct device *dev,
if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB) if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB)
return -EINVAL; return -EINVAL;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
r = 0; r = 0;
if (rot_type == ofbi->rotation_type) if (rot_type == ofbi->rotation_type)
...@@ -112,8 +111,7 @@ static ssize_t store_mirror(struct device *dev, ...@@ -112,8 +111,7 @@ static ssize_t store_mirror(struct device *dev,
if (r) if (r)
return r; return r;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
ofbi->mirror = mirror; ofbi->mirror = mirror;
...@@ -149,8 +147,7 @@ static ssize_t show_overlays(struct device *dev, ...@@ -149,8 +147,7 @@ static ssize_t show_overlays(struct device *dev,
ssize_t l = 0; ssize_t l = 0;
int t; int t;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
omapfb_lock(fbdev); omapfb_lock(fbdev);
for (t = 0; t < ofbi->num_overlays; t++) { for (t = 0; t < ofbi->num_overlays; t++) {
...@@ -208,8 +205,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr, ...@@ -208,8 +205,7 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr,
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
len = len - 1; len = len - 1;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
omapfb_lock(fbdev); omapfb_lock(fbdev);
if (len > 0) { if (len > 0) {
...@@ -340,8 +336,7 @@ static ssize_t show_overlays_rotate(struct device *dev, ...@@ -340,8 +336,7 @@ static ssize_t show_overlays_rotate(struct device *dev,
ssize_t l = 0; ssize_t l = 0;
int t; int t;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
for (t = 0; t < ofbi->num_overlays; t++) { for (t = 0; t < ofbi->num_overlays; t++) {
l += snprintf(buf + l, PAGE_SIZE - l, "%s%d", l += snprintf(buf + l, PAGE_SIZE - l, "%s%d",
...@@ -369,8 +364,7 @@ static ssize_t store_overlays_rotate(struct device *dev, ...@@ -369,8 +364,7 @@ static ssize_t store_overlays_rotate(struct device *dev,
if (buf[len - 1] == '\n') if (buf[len - 1] == '\n')
len = len - 1; len = len - 1;
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
if (len > 0) { if (len > 0) {
char *p = (char *)buf; char *p = (char *)buf;
...@@ -453,8 +447,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr, ...@@ -453,8 +447,7 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr,
size = PAGE_ALIGN(size); size = PAGE_ALIGN(size);
if (!lock_fb_info(fbi)) lock_fb_info(fbi);
return -ENODEV;
if (display && display->driver->sync) if (display && display->driver->sync)
display->driver->sync(display); display->driver->sync(display);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment