watchdog: marvell_gti_wdt: Fix error code in probe()
[ Upstream commit 4b2b39f9395bc66c616d8d5a83642950fc3719b1 ]
This error path accidentally returns success. Return -EINVAL instead.
Fixes: ef9e7fe2c8
("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
c8e639f574
commit
4bb72ab680
|
@ -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;
|
||||||
|
|
Loading…
Reference in New Issue