watchdog: remove error message when unable to allocate watchdog device
authorColin Ian King <colin.king@canonical.com>
Tue, 26 Apr 2016 17:18:49 +0000 (18:18 +0100)
committerWim Van Sebroeck <wim@iguana.be>
Sat, 14 May 2016 14:24:43 +0000 (16:24 +0200)
The dev_err message is superfluous because the failure is already
printed by dev_kzalloc, so remove it.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
drivers/watchdog/jz4740_wdt.c

index 6a7d5c365438120d5a31d59038f1aaea777b691c..c8d51ddb26d5d26acb3c14251a60cdeb21b0be2c 100644 (file)
@@ -160,10 +160,8 @@ static int jz4740_wdt_probe(struct platform_device *pdev)
 
        drvdata = devm_kzalloc(&pdev->dev, sizeof(struct jz4740_wdt_drvdata),
                               GFP_KERNEL);
-       if (!drvdata) {
-               dev_err(&pdev->dev, "Unable to alloacate watchdog device\n");
+       if (!drvdata)
                return -ENOMEM;
-       }
 
        if (heartbeat < 1 || heartbeat > MAX_HEARTBEAT)
                heartbeat = DEFAULT_HEARTBEAT;