Skip to content

Commit 4b2b39f

Browse files
Dan CarpenterWim Van Sebroeck
authored andcommitted
watchdog: marvell_gti_wdt: Fix error code in probe()
This error path accidentally returns success. Return -EINVAL instead. Fixes: ef9e7fe ("Watchdog: Add marvell GTI watchdog driver") Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Reviewed-by: Bharat Bhushan <bbhushan2@marvell.com> Reviewed-by: Guenter Roeck <linux@roeck-us.net> Link: https://lore.kernel.org/r/af326fd7-ac71-43a1-b7de-81779b61d242@moroto.mountain Signed-off-by: Guenter Roeck <linux@roeck-us.net> Signed-off-by: Wim Van Sebroeck <wim@linux-watchdog.org>
1 parent db7673e commit 4b2b39f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/watchdog/marvell_gti_wdt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ static int gti_wdt_probe(struct platform_device *pdev)
271271
&wdt_idx);
272272
if (!err) {
273273
if (wdt_idx >= priv->data->gti_num_timers)
274-
return dev_err_probe(&pdev->dev, err,
274+
return dev_err_probe(&pdev->dev, -EINVAL,
275275
"GTI wdog timer index not valid");
276276

277277
priv->wdt_timer_idx = wdt_idx;

0 commit comments

Comments
 (0)