diff options
author | Jani Nikula <ext-jani.1.nikula@nokia.com> | 2010-03-18 05:32:06 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@nokia.com> | 2010-05-18 07:14:29 -0400 |
commit | 27b67c92a30967e3a9e9ea082d4ca4bc6882f879 (patch) | |
tree | c5186c7b62b552839265581d7c6903cb86394902 /drivers/video/omap2/omapfb | |
parent | 238a41329ca208d1170962260babb428b6e222c2 (diff) |
OMAP: DSS2: check lock_fb_info() return value
Give up if lock_fb_info() fails, following the same convention as other
lock_fb_info() users.
Signed-off-by: Jani Nikula <ext-jani.1.nikula@nokia.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@nokia.com>
Diffstat (limited to 'drivers/video/omap2/omapfb')
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-ioctl.c | 3 | ||||
-rw-r--r-- | drivers/video/omap2/omapfb/omapfb-sysfs.c | 21 |
2 files changed, 16 insertions, 8 deletions
diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 2c0f01c44aab..9c7361871d78 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c | |||
@@ -183,7 +183,8 @@ int omapfb_update_window(struct fb_info *fbi, | |||
183 | struct omapfb2_device *fbdev = ofbi->fbdev; | 183 | struct omapfb2_device *fbdev = ofbi->fbdev; |
184 | int r; | 184 | int r; |
185 | 185 | ||
186 | lock_fb_info(fbi); | 186 | if (!lock_fb_info(fbi)) |
187 | return -ENODEV; | ||
187 | omapfb_lock(fbdev); | 188 | omapfb_lock(fbdev); |
188 | 189 | ||
189 | r = omapfb_update_window_nolock(fbi, x, y, w, h); | 190 | r = omapfb_update_window_nolock(fbi, x, y, w, h); |
diff --git a/drivers/video/omap2/omapfb/omapfb-sysfs.c b/drivers/video/omap2/omapfb/omapfb-sysfs.c index e10445017985..5179219128bd 100644 --- a/drivers/video/omap2/omapfb/omapfb-sysfs.c +++ b/drivers/video/omap2/omapfb/omapfb-sysfs.c | |||
@@ -57,7 +57,8 @@ static ssize_t store_rotate_type(struct device *dev, | |||
57 | if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB) | 57 | if (rot_type != OMAP_DSS_ROT_DMA && rot_type != OMAP_DSS_ROT_VRFB) |
58 | return -EINVAL; | 58 | return -EINVAL; |
59 | 59 | ||
60 | lock_fb_info(fbi); | 60 | if (!lock_fb_info(fbi)) |
61 | return -ENODEV; | ||
61 | 62 | ||
62 | r = 0; | 63 | r = 0; |
63 | if (rot_type == ofbi->rotation_type) | 64 | if (rot_type == ofbi->rotation_type) |
@@ -105,7 +106,8 @@ static ssize_t store_mirror(struct device *dev, | |||
105 | if (mirror != 0 && mirror != 1) | 106 | if (mirror != 0 && mirror != 1) |
106 | return -EINVAL; | 107 | return -EINVAL; |
107 | 108 | ||
108 | lock_fb_info(fbi); | 109 | if (!lock_fb_info(fbi)) |
110 | return -ENODEV; | ||
109 | 111 | ||
110 | ofbi->mirror = mirror; | 112 | ofbi->mirror = mirror; |
111 | 113 | ||
@@ -137,7 +139,8 @@ static ssize_t show_overlays(struct device *dev, | |||
137 | ssize_t l = 0; | 139 | ssize_t l = 0; |
138 | int t; | 140 | int t; |
139 | 141 | ||
140 | lock_fb_info(fbi); | 142 | if (!lock_fb_info(fbi)) |
143 | return -ENODEV; | ||
141 | omapfb_lock(fbdev); | 144 | omapfb_lock(fbdev); |
142 | 145 | ||
143 | for (t = 0; t < ofbi->num_overlays; t++) { | 146 | for (t = 0; t < ofbi->num_overlays; t++) { |
@@ -195,7 +198,8 @@ static ssize_t store_overlays(struct device *dev, struct device_attribute *attr, | |||
195 | if (buf[len - 1] == '\n') | 198 | if (buf[len - 1] == '\n') |
196 | len = len - 1; | 199 | len = len - 1; |
197 | 200 | ||
198 | lock_fb_info(fbi); | 201 | if (!lock_fb_info(fbi)) |
202 | return -ENODEV; | ||
199 | omapfb_lock(fbdev); | 203 | omapfb_lock(fbdev); |
200 | 204 | ||
201 | if (len > 0) { | 205 | if (len > 0) { |
@@ -317,7 +321,8 @@ static ssize_t show_overlays_rotate(struct device *dev, | |||
317 | ssize_t l = 0; | 321 | ssize_t l = 0; |
318 | int t; | 322 | int t; |
319 | 323 | ||
320 | lock_fb_info(fbi); | 324 | if (!lock_fb_info(fbi)) |
325 | return -ENODEV; | ||
321 | 326 | ||
322 | for (t = 0; t < ofbi->num_overlays; t++) { | 327 | for (t = 0; t < ofbi->num_overlays; t++) { |
323 | l += snprintf(buf + l, PAGE_SIZE - l, "%s%d", | 328 | l += snprintf(buf + l, PAGE_SIZE - l, "%s%d", |
@@ -345,7 +350,8 @@ static ssize_t store_overlays_rotate(struct device *dev, | |||
345 | if (buf[len - 1] == '\n') | 350 | if (buf[len - 1] == '\n') |
346 | len = len - 1; | 351 | len = len - 1; |
347 | 352 | ||
348 | lock_fb_info(fbi); | 353 | if (!lock_fb_info(fbi)) |
354 | return -ENODEV; | ||
349 | 355 | ||
350 | if (len > 0) { | 356 | if (len > 0) { |
351 | char *p = (char *)buf; | 357 | char *p = (char *)buf; |
@@ -416,7 +422,8 @@ static ssize_t store_size(struct device *dev, struct device_attribute *attr, | |||
416 | 422 | ||
417 | size = PAGE_ALIGN(simple_strtoul(buf, NULL, 0)); | 423 | size = PAGE_ALIGN(simple_strtoul(buf, NULL, 0)); |
418 | 424 | ||
419 | lock_fb_info(fbi); | 425 | if (!lock_fb_info(fbi)) |
426 | return -ENODEV; | ||
420 | 427 | ||
421 | for (i = 0; i < ofbi->num_overlays; i++) { | 428 | for (i = 0; i < ofbi->num_overlays; i++) { |
422 | if (ofbi->overlays[i]->info.enabled) { | 429 | if (ofbi->overlays[i]->info.enabled) { |