提交 f9849100 编写于 作者: M Mark Brown 提交者: Wim Van Sebroeck

watchdog: Don't overwrite error value in wm831x_wdt_set_timeout()

Reported-by: NDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: NWim Van Sebroeck <wim@iguana.be>
上级 943ef2ec
......@@ -150,7 +150,7 @@ static int wm831x_wdt_set_timeout(struct watchdog_device *wdt_dev,
if (wm831x_wdt_cfgs[i].time == timeout)
break;
if (i == ARRAY_SIZE(wm831x_wdt_cfgs))
ret = -EINVAL;
return -EINVAL;
ret = wm831x_reg_unlock(wm831x);
if (ret == 0) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册