Commit c593b520cf70b0672680da04cc1e8c5f93bd739d
1 parent
89e1e66d6b
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>
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
sound/soc/soc-core.c
... | ... | @@ -165,8 +165,11 @@ |
165 | 165 | { |
166 | 166 | struct snd_soc_pcm_runtime *rtd = |
167 | 167 | container_of(dev, struct snd_soc_pcm_runtime, dev); |
168 | + int ret; | |
168 | 169 | |
169 | - strict_strtol(buf, 10, &rtd->pmdown_time); | |
170 | + ret = strict_strtol(buf, 10, &rtd->pmdown_time); | |
171 | + if (ret) | |
172 | + return ret; | |
170 | 173 | |
171 | 174 | return count; |
172 | 175 | } |