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 <[email protected]> Reviewed-by: Bharat Bhushan <[email protected]> Reviewed-by: Guenter Roeck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Guenter Roeck <[email protected]> Signed-off-by: Wim Van Sebroeck <[email protected]>
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)