aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Carpenter <[email protected]>2023-09-07 12:53:15 +0300
committerWim Van Sebroeck <[email protected]>2023-10-29 19:45:03 +0100
commit4b2b39f9395bc66c616d8d5a83642950fc3719b1 (patch)
treecb586be3dd4483db5a355587af62a68e3f5f80d2
parentdb7673e6d5783a8664840b9218f58b5b836603ce (diff)
watchdog: marvell_gti_wdt: Fix error code in probe()
This error path accidentally returns success. Return -EINVAL instead. Fixes: ef9e7fe2c890 ("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]>
-rw-r--r--drivers/watchdog/marvell_gti_wdt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/watchdog/marvell_gti_wdt.c b/drivers/watchdog/marvell_gti_wdt.c
index d5a1ff91d423..e835618e6be3 100644
--- a/drivers/watchdog/marvell_gti_wdt.c
+++ b/drivers/watchdog/marvell_gti_wdt.c
@@ -271,7 +271,7 @@ static int gti_wdt_probe(struct platform_device *pdev)
&wdt_idx);
if (!err) {
if (wdt_idx >= priv->data->gti_num_timers)
- return dev_err_probe(&pdev->dev, err,
+ return dev_err_probe(&pdev->dev, -EINVAL,
"GTI wdog timer index not valid");
priv->wdt_timer_idx = wdt_idx;