watchdog: loongson1: Simplify ls1x_wdt_probe code

Remove meaningless output to simplify ls1x_wdt_probe().

Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
This commit is contained in:
Binbin Zhou
2025-11-07 14:01:28 +08:00
committed by Wim Van Sebroeck
parent f909b3d4f1
commit 6121d0b889

View File

@@ -108,11 +108,11 @@ static int ls1x_wdt_probe(struct platform_device *pdev)
struct ls1x_wdt_drvdata *drvdata;
struct watchdog_device *ls1x_wdt;
unsigned long clk_rate;
int err;
drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
if (!drvdata)
return -ENOMEM;
platform_set_drvdata(pdev, drvdata);
drvdata->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(drvdata->base))
@@ -139,15 +139,7 @@ static int ls1x_wdt_probe(struct platform_device *pdev)
watchdog_set_nowayout(ls1x_wdt, nowayout);
watchdog_set_drvdata(ls1x_wdt, drvdata);
err = devm_watchdog_register_device(dev, &drvdata->wdt);
if (err)
return err;
platform_set_drvdata(pdev, drvdata);
dev_info(dev, "Loongson1 Watchdog driver registered\n");
return 0;
return devm_watchdog_register_device(dev, &drvdata->wdt);
}
#ifdef CONFIG_OF