summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohannes Thumshirn <morbidrsa@googlemail.com>2012-08-06 14:08:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-13 19:15:49 -0700
commitcdf5e55124e4804fc0027df7e89567a3f5eed8bf (patch)
tree77b66d85f2426cc4b9ad2650bfaf2f39f1818667
parentd7de993503aa23f34d58b7945cf00ad9a9486bda (diff)
downloadlinux-cdf5e55124e4804fc0027df7e89567a3f5eed8bf.tar.bz2
staging: line6: pcm.c: Changed simple_strtoul to kstrtoint
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>
-rw-r--r--drivers/staging/line6/pcm.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 5e319e3ce685..7fe44a6fd0ed 100644
--- a/drivers/staging/line6/pcm.c
+++ b/drivers/staging/line6/pcm.c
@@ -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)