aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-03 09:37:06 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2010-11-03 12:33:15 -0400
commit74a557e27ff86a5a1f8d5f24c178c70b98367b12 (patch)
tree95336ee5e9622eaab42981f22bd988283119fc2e /sound
parentd6e116ba1e600596ddb121775986d4a1ee41e34e (diff)
downloadmrst-s0i3-test-74a557e27ff86a5a1f8d5f24c178c70b98367b12.tar.gz
mrst-s0i3-test-74a557e27ff86a5a1f8d5f24c178c70b98367b12.tar.xz
mrst-s0i3-test-74a557e27ff86a5a1f8d5f24c178c70b98367b12.zip
ASoC: Check return value of strict_strtoul() in WM8962
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>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8962.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 894d0cd3aa9..e8092745a20 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -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);