From: "Laurent Navet [Mali]" <[email protected]> staging: line6: pcm.c call to obsolete simple_strtoul() function is replaced by kstrtoint() in pcm_set_impulse_period(). Also check the return code.
Signed-off-by: Laurent Navet [Mali] <[email protected]> --- 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 a0ce781..876ab89 100644 --- a/drivers/staging/line6/pcm.c +++ b/drivers/staging/line6/pcm.c @@ -81,7 +81,13 @@ static ssize_t pcm_set_impulse_period(struct device *dev, struct device_attribute *attr, const char *buf, size_t count) { - dev2pcm(dev)->impulse_period = simple_strtoul(buf, NULL, 10); + int value; + int rv; + rv = kstrtoint(buf, 10, &value); + if (rv < 0) + return rv; + + dev2pcm(dev)->impulse_period = value; return count; } -- 1.7.10.4 ------------------------------------------------------------------------------ Keep yourself connected to Go Parallel: VERIFY Test and improve your parallel project with help from experts and peers. http://goparallel.sourceforge.net _______________________________________________ Line6linux-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/line6linux-devel
