Re: [PATCH v2 1/2] staging: rtl8188eu: Deletion of unnecessary checks before three function calls

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

 




On Wed, 12 Nov 2014, SF Markus Elfring wrote:

> From: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> Date: Wed, 12 Nov 2014 20:25:49 +0100
>
> The functions kfree(), rtw_free_netdev() and vfree() test whether their
> argument is NULL and then return immediately. Thus the test around the call
> is not needed.
>
> This issue was detected by using the Coccinelle software.
>
> Signed-off-by: Markus Elfring <elfring@xxxxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/staging/rtl8188eu/core/rtw_efuse.c   | 3 +--
>  drivers/staging/rtl8188eu/core/rtw_mlme.c    | 3 +--
>  drivers/staging/rtl8188eu/core/rtw_sta_mgt.c | 3 +--
>  drivers/staging/rtl8188eu/core/rtw_xmit.c    | 6 ++----
>  drivers/staging/rtl8188eu/os_dep/usb_intf.c  | 6 +++---
>  5 files changed, 8 insertions(+), 13 deletions(-)
>
> diff --git a/drivers/staging/rtl8188eu/core/rtw_efuse.c b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> index 5b997b2..697876b 100644
> --- a/drivers/staging/rtl8188eu/core/rtw_efuse.c
> +++ b/drivers/staging/rtl8188eu/core/rtw_efuse.c
> @@ -212,8 +212,7 @@ efuse_phymap_to_logical(u8 *phymap, u16 _offset, u16 _size_byte, u8  *pbuf)
>  exit:
>  	kfree(efuseTbl);
>
> -	if (eFuseWord)
> -		kfree(eFuseWord);
> +	kfree(eFuseWord);
>  }

As far as I can tell, the 2/2 patch in this series proposes a completely
different fix for this code.  When you send a series, patch n+1/m is
supposed to apply to the result of patch n/m.

In any case, you can let this one go, because the problem has been fixed
already.

julia
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux