diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-02-11 11:26:21 +0100 |
---|---|---|
committer | Wim Van Sebroeck <wim@iguana.be> | 2015-03-27 08:47:36 +0100 |
commit | 9ffd906d9a6e50c958bd99971d762a426a12a36a (patch) | |
tree | 19d40ce869a4ae9d61984bd10dab8516c2c1df0c /drivers/watchdog/mtk_wdt.c | |
parent | Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux (diff) | |
download | linux-9ffd906d9a6e50c958bd99971d762a426a12a36a.tar.xz linux-9ffd906d9a6e50c958bd99971d762a426a12a36a.zip |
watchdog: mtk_wdt: signedness bug in mtk_wdt_start()
"ret" should be signed for the error handling to work correctly. This
doesn't matter much in real life since mtk_wdt_set_timeout() always
succeeds.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
Diffstat (limited to 'drivers/watchdog/mtk_wdt.c')
-rw-r--r-- | drivers/watchdog/mtk_wdt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/mtk_wdt.c b/drivers/watchdog/mtk_wdt.c index a87f6df6e85f..938b987de551 100644 --- a/drivers/watchdog/mtk_wdt.c +++ b/drivers/watchdog/mtk_wdt.c @@ -133,7 +133,7 @@ static int mtk_wdt_start(struct watchdog_device *wdt_dev) u32 reg; struct mtk_wdt_dev *mtk_wdt = watchdog_get_drvdata(wdt_dev); void __iomem *wdt_base = mtk_wdt->wdt_base; - u32 ret; + int ret; ret = mtk_wdt_set_timeout(wdt_dev, wdt_dev->timeout); if (ret < 0) |