Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Binbin Zhou and committed by
Wim Van Sebroeck
6121d0b8 f909b3d4

+2 -10
+2 -10
drivers/watchdog/loongson1_wdt.c
··· 108 108 struct ls1x_wdt_drvdata *drvdata; 109 109 struct watchdog_device *ls1x_wdt; 110 110 unsigned long clk_rate; 111 - int err; 112 111 113 112 drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL); 114 113 if (!drvdata) 115 114 return -ENOMEM; 115 + platform_set_drvdata(pdev, drvdata); 116 116 117 117 drvdata->base = devm_platform_ioremap_resource(pdev, 0); 118 118 if (IS_ERR(drvdata->base)) ··· 139 139 watchdog_set_nowayout(ls1x_wdt, nowayout); 140 140 watchdog_set_drvdata(ls1x_wdt, drvdata); 141 141 142 - err = devm_watchdog_register_device(dev, &drvdata->wdt); 143 - if (err) 144 - return err; 145 - 146 - platform_set_drvdata(pdev, drvdata); 147 - 148 - dev_info(dev, "Loongson1 Watchdog driver registered\n"); 149 - 150 - return 0; 142 + return devm_watchdog_register_device(dev, &drvdata->wdt); 151 143 } 152 144 153 145 #ifdef CONFIG_OF