Re: [PATCH v2] staging: r8188eu: convert rtw_pwr_wakeup to correct error code semantics

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

 



On Wed, Jul 27, 2022 at 03:43:42PM +0300, Dan Carpenter wrote:
> On Wed, Jul 27, 2022 at 08:33:14AM +0200, Greg KH wrote:
> > > diff --git a/drivers/staging/r8188eu/core/rtw_pwrctrl.c b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > index cf9020a73933..8b1c50668dfe 100644
> > > --- a/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > +++ b/drivers/staging/r8188eu/core/rtw_pwrctrl.c
> > > @@ -381,24 +381,24 @@ int rtw_pwr_wakeup(struct adapter *padapter)
> > >  	struct mlme_priv *pmlmepriv = &padapter->mlmepriv;
> > >  	unsigned long timeout = jiffies + msecs_to_jiffies(3000);
> > >  	unsigned long deny_time;
> > > -	int ret = _SUCCESS;
> > > +	int ret = 0;
> > >  
> > >  	while (pwrpriv->ps_processing && time_before(jiffies, timeout))
> > >  		msleep(10);
> > >  
> > >  	/* I think this should be check in IPS, LPS, autosuspend functions... */
> > >  	if (check_fwstate(pmlmepriv, _FW_LINKED)) {
> > > -		ret = _SUCCESS;
> > > +		ret = 0;
> > 
> > Nit, you don't need to set this again, as you already set it above to 0.
> > 
> 
> I would sort of prefer to drop the initialization and keep this one.

Fine with me, either works.

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux