]> www.infradead.org Git - users/hch/misc.git/commitdiff
watchdog: rza_wdt: don't print out if registering watchdog fails
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Fri, 4 Oct 2024 20:03:11 +0000 (22:03 +0200)
committerWim Van Sebroeck <wim@linux-watchdog.org>
Tue, 5 Nov 2024 09:04:37 +0000 (10:04 +0100)
The core will do this already.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Wim Van Sebroeck <wim@linux-watchdog.org>
Link: https://lore.kernel.org/r/20241004200314.5459-9-wsa+renesas@sang-engineering.com
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
drivers/watchdog/rza_wdt.c

index cb4901b3f7778914995f0339213bd04f9fae0d51..9334255a37e9338fa7add8229000ae9e1d79f139 100644 (file)
@@ -169,7 +169,6 @@ static int rza_wdt_probe(struct platform_device *pdev)
        struct device *dev = &pdev->dev;
        struct rza_wdt *priv;
        unsigned long rate;
-       int ret;
 
        priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
        if (!priv)
@@ -218,11 +217,7 @@ static int rza_wdt_probe(struct platform_device *pdev)
        watchdog_init_timeout(&priv->wdev, 0, dev);
        watchdog_set_drvdata(&priv->wdev, priv);
 
-       ret = devm_watchdog_register_device(dev, &priv->wdev);
-       if (ret)
-               dev_err(dev, "Cannot register watchdog device\n");
-
-       return ret;
+       return devm_watchdog_register_device(dev, &priv->wdev);
 }
 
 static const struct of_device_id rza_wdt_of_match[] = {