watchdog: mtk_wdt: signedness bug in mtk_wdt_start()
authorDan Carpenter <dan.carpenter@oracle.com>
Wed, 11 Feb 2015 10:26:21 +0000 (13:26 +0300)
committerWim Van Sebroeck <wim@iguana.be>
Fri, 27 Mar 2015 07:47:36 +0000 (08:47 +0100)
"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>
drivers/watchdog/mtk_wdt.c

index a87f6df6e85f32993db3907d66f3066c8820a91d..938b987de551bdea7615a701007d0125f9a10d8b 100644 (file)
@@ -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)