lkml.org 
[lkml]   [2011]   [Jun]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2/2] mfd/ab8500: Use kstrtoul_from_user
From
NAK
You should use kstrtou8_from_user() and drop 0xff check as well.

Do NOT blindly replace strict_strtoul with kstrtoul.

On Mon, Jun 6, 2011 at 11:43 PM, Peter Huewe <peterhuewe@gmx.de> wrote:
> -       err = strict_strtoul(buf, 0, &user_val);
> +       err = kstrtoul_from_user(user_buf, count, 0, &user_val);
>        if (err)
> -               return -EINVAL;
> +               return err;
> +
>        if (user_val > 0xff) {
>                dev_err(dev, "debugfs error input > 0xff\n");
>                return -EINVAL;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2011-06-20 15:47    [W:0.054 / U:1.432 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site