staging: line6: pcm.c: Changed simple_strtoul to kstrtoint
authorJohannes Thumshirn <morbidrsa@googlemail.com>
Mon, 6 Aug 2012 12:08:50 +0000 (14:08 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Aug 2012 02:15:49 +0000 (19:15 -0700)
Changed call to simple_strtoul to kstrtoint in pcm_set_impulse_volume(...)

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/line6/pcm.c

index 5e319e3ce68541b6c077578a0d6963ba323e1433..7fe44a6fd0eda32630e230fe82dde2dcf098f328 100644 (file)
@@ -48,7 +48,13 @@ static ssize_t pcm_set_impulse_volume(struct device *dev,
                                      const char *buf, size_t count)
 {
        struct snd_line6_pcm *line6pcm = dev2pcm(dev);
-       int value = simple_strtoul(buf, NULL, 10);
+       int value;
+       int rv;
+
+       rv = kstrtoint(buf, 10, &value);
+       if (rv < 0)
+               return rv;
+
        line6pcm->impulse_volume = value;
 
        if (value > 0)