On Wed, Nov 23, 2011 at 04:33:41PM +0100, Andreas Ruprecht wrote:
> diff --git a/drivers/staging/iio/adc/ad7280a.c 
> b/drivers/staging/iio/adc/ad7280a.c
> index 372d059..319b1c6 100644
> --- a/drivers/staging/iio/adc/ad7280a.c
> +++ b/drivers/staging/iio/adc/ad7280a.c
> @@ -458,7 +458,7 @@ static ssize_t ad7280_store_balance_timer(struct device 
> *dev,
>       long val;
>       int ret;
>  
> -     ret = strict_strtoul(buf, 10, &val);
> +     ret = kstrtoul(buf, 10, &val);

When you're doing these, double check that the type of the variable
matches the funcion.  kstrtoul() expects an unsigned long, but val
is signed.

It's a small bug.  val should be changed to unsigned long.  Later on
we cap the upper values of val, but we don't check whether it is
negative.

regards,
dan carpenter

Attachment: signature.asc
Description: Digital signature

_______________________________________________
devel mailing list
[email protected]
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel

Reply via email to