RE: [patch] backlight: s6e63m0: corruption storing gamma mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Acked-by: Inki Dae <inki.dae@xxxxxxxxxxx>

Thanks.

> -----Original Message-----
> From: linux-fbdev-owner@xxxxxxxxxxxxxxx [mailto:linux-fbdev-
> owner@xxxxxxxxxxxxxxx] On Behalf Of Dan Carpenter
> Sent: Friday, March 02, 2012 3:56 PM
> To: Richard Purdie; InKi Dae
> Cc: Florian Tobias Schandinat; linux-fbdev@xxxxxxxxxxxxxxx; kernel-
> janitors@xxxxxxxxxxxxxxx
> Subject: [patch] backlight: s6e63m0: 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@xxxxxxxxxx>
> 
> diff --git a/drivers/video/backlight/s6e63m0.c
> b/drivers/video/backlight/s6e63m0.c
> index 9b0092e..e264f55 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;
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux