Commit 4b2b39f9 authored by Dan Carpenter's avatar Dan Carpenter Committed by Wim Van Sebroeck

watchdog: marvell_gti_wdt: Fix error code in probe()

This error path accidentally returns success.  Return -EINVAL instead.

Fixes: ef9e7fe2 ("Watchdog: Add marvell GTI watchdog driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: default avatarBharat Bhushan <bbhushan2@marvell.com>
Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
Link: https://lore.kernel.org/r/af326fd7-ac71-43a1-b7de-81779b61d242@moroto.mountainSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarWim Van Sebroeck <wim@linux-watchdog.org>
parent db7673e6
...@@ -271,7 +271,7 @@ static int gti_wdt_probe(struct platform_device *pdev) ...@@ -271,7 +271,7 @@ static int gti_wdt_probe(struct platform_device *pdev)
&wdt_idx); &wdt_idx);
if (!err) { if (!err) {
if (wdt_idx >= priv->data->gti_num_timers) 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"); "GTI wdog timer index not valid");
priv->wdt_timer_idx = wdt_idx; priv->wdt_timer_idx = wdt_idx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment