Skip to content

Commit

Permalink
ASoC: Check return value of strict_strtoul() in WM8962
Browse files Browse the repository at this point in the history
strict_strtoul() has been made __must_check so do so.

Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Liam Girdwood <lrg@slimlogic.co.uk>
  • Loading branch information
Mark Brown committed Nov 3, 2010
1 parent d6e116b commit 74a557e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sound/soc/codecs/wm8962.c
Original file line number Diff line number Diff line change
Expand Up @@ -3500,8 +3500,11 @@ static ssize_t wm8962_beep_set(struct device *dev,
{
struct wm8962_priv *wm8962 = dev_get_drvdata(dev);
long int time;
int ret;

strict_strtol(buf, 10, &time);
ret = strict_strtol(buf, 10, &time);
if (ret != 0)
return ret;

input_event(wm8962->beep, EV_SND, SND_TONE, time);

Expand Down

0 comments on commit 74a557e

Please sign in to comment.