Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Dan Carpenter and committed by
Linus Torvalds
cf2b94da 5eb1eb4e

+1 -1
+1 -1
drivers/video/backlight/s6e63m0.c
··· 690 690 struct backlight_device *bd = NULL; 691 691 int brightness, rc; 692 692 693 - rc = strict_strtoul(buf, 0, (unsigned long *)&lcd->gamma_mode); 693 + rc = kstrtouint(buf, 0, &lcd->gamma_mode); 694 694 if (rc < 0) 695 695 return rc; 696 696