From: Mark Brown Date: Wed, 3 Nov 2010 13:37:06 +0000 (-0400) Subject: ASoC: Check return value of strict_strtoul() in WM8962 X-Git-Tag: Ubuntu-5.2.0-15.16~22928^2^2~45 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=74a557e27ff86a5a1f8d5f24c178c70b98367b12;p=mirror_ubuntu-eoan-kernel.git ASoC: Check return value of strict_strtoul() in WM8962 strict_strtoul() has been made __must_check so do so. Signed-off-by: Mark Brown Acked-by: Liam Girdwood --- diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 894d0cd3aa9b..e8092745a207 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);