diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2012-03-15 23:17:12 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-16 01:03:04 +0100 |
commit | cf2b94daab9f3d21b0a393bef91292622f6a8ca4 (patch) | |
tree | 94072a3065136a32496265be81922274db8021cd /drivers/video | |
parent | MAINTAINERS: add entry for exynos mipi display drivers (diff) | |
download | linux-cf2b94daab9f3d21b0a393bef91292622f6a8ca4.tar.xz linux-cf2b94daab9f3d21b0a393bef91292622f6a8ca4.zip |
drivers/video/backlight/s6e63m0.c: fix corruption storing gamma mode
strict_strtoul() writes a long but ->gamma_mode only has space to store an
int, so on 64 bit systems we end up scribbling over ->gamma_table_count as
well. I've changed it to use kstrtouint() instead.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Inki Dae <inki.dae@samsung.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/video/backlight/s6e63m0.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/backlight/s6e63m0.c b/drivers/video/backlight/s6e63m0.c index e132157d8545..516db703dd24 100644 --- a/drivers/video/backlight/s6e63m0.c +++ b/drivers/video/backlight/s6e63m0.c @@ -690,7 +690,7 @@ static ssize_t s6e63m0_sysfs_store_gamma_mode(struct device *dev, struct backlight_device *bd = NULL; int brightness, rc; - rc = strict_strtoul(buf, 0, (unsigned long *)&lcd->gamma_mode); + rc = kstrtouint(buf, 0, &lcd->gamma_mode); if (rc < 0) return rc; |