mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] line6: pcm.c: Changed simple_strtoul to kstrtoint
@ 2012-08-06 12:08 Johannes Thumshirn
  2012-08-06 12:26 ` Stefan Hajnoczi
  0 siblings, 1 reply; 2+ messages in thread
From: Johannes Thumshirn @ 2012-08-06 12:08 UTC (permalink / raw)
  To: gregkh, grabner, stefanha, morbidrsa; +Cc: devel, linux-kernel

Changed call to simple_strtoul to kstrtoint in pcm_set_impulse_volume(...)

Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
---
 drivers/staging/line6/pcm.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/staging/line6/pcm.c b/drivers/staging/line6/pcm.c
index 5e319e3..7fe44a6 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)
-- 
1.7.11.2


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] line6: pcm.c: Changed simple_strtoul to kstrtoint
  2012-08-06 12:08 [PATCH] line6: pcm.c: Changed simple_strtoul to kstrtoint Johannes Thumshirn
@ 2012-08-06 12:26 ` Stefan Hajnoczi
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Hajnoczi @ 2012-08-06 12:26 UTC (permalink / raw)
  To: Johannes Thumshirn; +Cc: gregkh, grabner, devel, linux-kernel

On Mon, Aug 6, 2012 at 1:08 PM, Johannes Thumshirn
<morbidrsa@googlemail.com> wrote:
> Changed call to simple_strtoul to kstrtoint in pcm_set_impulse_volume(...)
>
> Signed-off-by: Johannes Thumshirn <morbidrsa@googlemail.com>
> ---
>  drivers/staging/line6/pcm.c | 8 +++++++-
>  1 file changed, 7 insertions(+), 1 deletion(-)

Reviewed-by: Stefan Hajnoczi <stefanha@gmail.com>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-08-06 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 12:08 [PATCH] line6: pcm.c: Changed simple_strtoul to kstrtoint Johannes Thumshirn
2012-08-06 12:26 ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®