RE: [PATCH v5 5/7] watchdog: rzg2l_wdt: Add error check for reset_control_deassert

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Sergei,

Thanks for the feedback.

> Subject: Re: [PATCH v5 5/7] watchdog: rzg2l_wdt: Add error check for
> reset_control_deassert
> 
> Hello!
> 
> On 2/25/22 8:53 PM, Biju Das wrote:
> 
> > If reset_control_deassert() fails, then we won't be able to access the
> > device registers. Therefore check the return code of
> > reset_control_deassert() and bailout in case of error.
> >
> > Signed-off-by: Biju Das <biju.das.jz@xxxxxxxxxxxxxx>
> [...]
> 
> > diff --git a/drivers/watchdog/rzg2l_wdt.c
> > b/drivers/watchdog/rzg2l_wdt.c index 88274704b260..73b667ed3e99 100644
> > --- a/drivers/watchdog/rzg2l_wdt.c
> > +++ b/drivers/watchdog/rzg2l_wdt.c
> > @@ -203,7 +203,10 @@ static int rzg2l_wdt_probe(struct platform_device
> *pdev)
> >  		return dev_err_probe(&pdev->dev, PTR_ERR(priv->rstc),
> >  				     "failed to get cpg reset");
> >
> > -	reset_control_deassert(priv->rstc);
> > +	ret = reset_control_deassert(priv->rstc);
> > +	if (ret)
> > +		return dev_err_probe(dev, ret, "failed to deassert");
> 
>    Deassert what? :-)

failed to deassert WDT_PRESETN reset signal.

Cheers,
Biju




[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux