> -----Original Message----- > From: Guenter Roeck <groeck7@xxxxxxxxx> On Behalf Of Guenter Roeck > Sent: Thursday, September 7, 2023 4:55 PM > To: Dan Carpenter <dan.carpenter@xxxxxxxxxx>; Bharat Bhushan > <bbhushan2@xxxxxxxxxxx> > Cc: Wim Van Sebroeck <wim@xxxxxxxxxxxxxxxxxx>; linux- > watchdog@xxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx > Subject: [EXT] Re: [PATCH] watchdog: marvell_gti_wdt: Fix error code in probe() > > External Email > > ---------------------------------------------------------------------- > On 9/7/23 02:53, Dan Carpenter wrote: > > This error path accidentally returns success. Return -EINVAL instead. > > > > Fixes: ef9e7fe2c890 ("Watchdog: Add marvell GTI watchdog driver") > > Signed-off-by: Dan Carpenter <dan.carpenter@xxxxxxxxxx> > > Reviewed-by: Guenter Roeck <linux@xxxxxxxxxxxx> Reviewed-by: Bharat Bhushan <bbhushan2@xxxxxxxxxxx> Thanks -Bharat > > > --- > > drivers/watchdog/marvell_gti_wdt.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/watchdog/marvell_gti_wdt.c > b/drivers/watchdog/marvell_gti_wdt.c > > index d7eb8286e11e..1ec1e014ba83 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;