line6: pcm.c: Changed simple_strtoul to kstrtoint
PATCH 1/1 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 <[email protected]>
--- drivers/staging/line6/pcm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/staging/line6/pcm.c +7 -1
@@ -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 )
Signature · 1 line
1.7.11.2
Quoted 6 lines · Johannes Thumshirn
Changed call to
simple_strtoulto kstrtoint inpcm_set_impulse_volume(...)Signed-off-by Johannes Thumshirn <[email protected]>--- drivers/staging/line6/pcm.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
Reviewed-by Stefan Hajnoczi <[email protected]>