From: Mark Brown Date: Thu, 28 Oct 2010 03:11:17 +0000 (-0700) Subject: ASoC: Check return value of struct_strtoul() in pmdown_time_set() X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c593b520cf70b0672680da04cc1e8c5f93bd739d;p=linux-beck.git ASoC: Check return value of struct_strtoul() in pmdown_time_set() strict_strtoul() has just been made must check so do so. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c index 70d9a7394b2b..805343fe903b 100644 --- a/sound/soc/soc-core.c +++ b/sound/soc/soc-core.c @@ -165,8 +165,11 @@ static ssize_t pmdown_time_set(struct device *dev, { struct snd_soc_pcm_runtime *rtd = container_of(dev, struct snd_soc_pcm_runtime, dev); + int ret; - strict_strtol(buf, 10, &rtd->pmdown_time); + ret = strict_strtol(buf, 10, &rtd->pmdown_time); + if (ret) + return ret; return count; }