Skip to content

Commit

Permalink
ASoC: Check return value of struct_strtoul() in pmdown_time_set()
Browse files Browse the repository at this point in the history
strict_strtoul() has just been made must check so do so.

Signed-off-by: Mark Brown <[email protected]>
Acked-by: Liam Girdwood <[email protected]>
  • Loading branch information
broonie committed Oct 28, 2010
1 parent 89e1e66 commit c593b52
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/soc-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit c593b52

Please sign in to comment.