]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
ASoC: Check return value of strict_strtoul() in WM8962
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 13:37:06 +0000 (09:37 -0400)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 3 Nov 2010 16:33:15 +0000 (12:33 -0400)
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>
sound/soc/codecs/wm8962.c

index 894d0cd3aa9b95896fbaff30db883b1fe39bc668..e8092745a207674caaf4351d815870e7367b4003 100644 (file)
@@ -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);