aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/fbsysfs.c
diff options
context:
space:
mode:
authorTodd Poynor <toddpoynor@google.com>2013-03-13 17:35:08 -0700
committerTodd Poynor <toddpoynor@google.com>2013-03-13 17:35:08 -0700
commit1249d25539343d1a7fe361c8d40be7a5df5b0216 (patch)
tree770c9a33604bb00c62f44d780aefab27e4eb9379 /drivers/video/fbsysfs.c
parent4aad13d07babf68c1d0d37ff1e5f797573c4fd2a (diff)
parent0b203ab4aacdb6e6dfb8c277aa290f0a02428e6f (diff)
downloadkernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.zip
kernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.tar.gz
kernel_samsung_tuna-1249d25539343d1a7fe361c8d40be7a5df5b0216.tar.bz2
Merge branch 'android-3.0' into android-omap-3.0
Diffstat (limited to 'drivers/video/fbsysfs.c')
-rw-r--r--drivers/video/fbsysfs.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/video/fbsysfs.c b/drivers/video/fbsysfs.c
index 67afa9c..303fb9f 100644
--- a/drivers/video/fbsysfs.c
+++ b/drivers/video/fbsysfs.c
@@ -175,6 +175,8 @@ static ssize_t store_modes(struct device *device,
if (i * sizeof(struct fb_videomode) != count)
return -EINVAL;
+ if (!lock_fb_info(fb_info))
+ return -ENODEV;
console_lock();
list_splice(&fb_info->modelist, &old_list);
fb_videomode_to_modelist((const struct fb_videomode *)buf, i,
@@ -186,6 +188,7 @@ static ssize_t store_modes(struct device *device,
fb_destroy_modelist(&old_list);
console_unlock();
+ unlock_fb_info(fb_info);
return 0;
}