Skip to content

Commit

Permalink
staging: line6: pcm.c: Changed simple_strtoul to kstrtoint
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Johannes Thumshirn authored and Greg Kroah-Hartman committed Aug 14, 2012
1 parent d7de993 commit cdf5e55
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion drivers/staging/line6/pcm.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit cdf5e55

Please sign in to comment.