aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-10-27 20:11:17 -0700
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-10-28 11:12:35 -0700
commitc593b520cf70b0672680da04cc1e8c5f93bd739d (patch)
treef4377f4339e10119f11056877dc7a80c9903226d /sound
parent89e1e66d6be8a520cdcd26043cda2cc870a34015 (diff)
downloadkernel_samsung_tuna-c593b520cf70b0672680da04cc1e8c5f93bd739d.zip
kernel_samsung_tuna-c593b520cf70b0672680da04cc1e8c5f93bd739d.tar.gz
kernel_samsung_tuna-c593b520cf70b0672680da04cc1e8c5f93bd739d.tar.bz2
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 <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/soc-core.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
index 70d9a73..805343f 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;
}