Re: [PATCH] staging: rtl8723bs: core: drop unneeded null tests

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

 




On Sat, 8 Apr 2017, Hans de Goede wrote:

> Hi Julia,
>
> On 08-04-17 19:10, Julia Lawall wrote:
> > kfree returns immediately on NULL so the tests are not needed.
> >
> > Generated by: scripts/coccinelle/free/ifnullfree.cocci
> >
> > CC: Hans de Goede <hdegoede@xxxxxxxxxx>
> > Signed-off-by: Julia Lawall <julia.lawall@xxxxxxx>
> > Signed-off-by: Fengguang Wu <fengguang.wu@xxxxxxxxx>
>
> Thank you for these patches. Larry Finger has just
> posted a large cleanup series for the rtl8723bs
> driver, which will likely conflict with these.
>
> Can you rebase and resend these patches once Larry's
> series has been merged please?

OK, thanks for the update.  There were a bunch of other coccicheck
warnings.  But I will wait for the improved version.

julia


>
> Regards,
>
> Hans
>
>
>
> > ---
> >
> >  rtw_cmd.c |    6 ++----
> >  1 file changed, 2 insertions(+), 4 deletions(-)
> >
> > --- a/drivers/staging/rtl8723bs/core/rtw_cmd.c
> > +++ b/drivers/staging/rtl8723bs/core/rtw_cmd.c
> > @@ -248,11 +248,9 @@ void _rtw_free_evt_priv(struct	evt_priv
> >  void _rtw_free_cmd_priv(struct	cmd_priv *pcmdpriv)
> >  {
> >  	if (pcmdpriv) {
> > -		if (pcmdpriv->cmd_allocated_buf)
> > -			kfree(pcmdpriv->cmd_allocated_buf);
> > +		kfree(pcmdpriv->cmd_allocated_buf);
> >
> > -		if (pcmdpriv->rsp_allocated_buf)
> > -			kfree(pcmdpriv->rsp_allocated_buf);
> > +		kfree(pcmdpriv->rsp_allocated_buf);
> >
> >  		mutex_destroy(&pcmdpriv->sctx_mutex);
> >  	}
> >
>
_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [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