diff mbox series

[wireless,-next] rtw88: Delete useless kfree code

Message ID 20201216130442.13869-1-zhengyongjun3@huawei.com (mailing list archive)
State Accepted
Commit 8873e8f56f74013ecf7aca6d8e66c600dc40ce64
Delegated to: Kalle Valo
Headers show
Series [wireless,-next] rtw88: Delete useless kfree code | expand

Commit Message

Zheng Yongjun Dec. 16, 2020, 1:04 p.m. UTC
The parameter of kfree function is NULL, so kfree code is useless, delete it.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/net/wireless/realtek/rtw88/main.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ping-Ke Shih Dec. 17, 2020, 12:55 a.m. UTC | #1
On Wed, 2020-12-16 at 13:04 +0000, Zheng Yongjun wrote:
> The parameter of kfree function is NULL, so kfree code is useless, delete it.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>

Acked-by: Ping-Ke Shih <pkshih@realtek.com>

> ---
>  drivers/net/wireless/realtek/rtw88/main.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/net/wireless/realtek/rtw88/main.c
> b/drivers/net/wireless/realtek/rtw88/main.c
> index 565efd880624..15568cd670a3 100644
> --- a/drivers/net/wireless/realtek/rtw88/main.c
> +++ b/drivers/net/wireless/realtek/rtw88/main.c
> @@ -1249,7 +1249,6 @@ static void rtw_set_supported_band(struct ieee80211_hw
> *hw,
>  
>  err_out:
>  	rtw_err(rtwdev, "failed to set supported band\n");
> -	kfree(sband);
>  }
>  
>  static void rtw_unset_supported_band(struct ieee80211_hw *hw,
Kalle Valo Jan. 14, 2021, 5:25 p.m. UTC | #2
Zheng Yongjun <zhengyongjun3@huawei.com> wrote:

> The parameter of kfree function is NULL, so kfree code is useless, delete it.
> 
> Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
> Acked-by: Ping-Ke Shih <pkshih@realtek.com>

Patch applied to wireless-drivers-next.git, thanks.

8873e8f56f74 rtw88: Delete useless kfree code
diff mbox series

Patch

diff --git a/drivers/net/wireless/realtek/rtw88/main.c b/drivers/net/wireless/realtek/rtw88/main.c
index 565efd880624..15568cd670a3 100644
--- a/drivers/net/wireless/realtek/rtw88/main.c
+++ b/drivers/net/wireless/realtek/rtw88/main.c
@@ -1249,7 +1249,6 @@  static void rtw_set_supported_band(struct ieee80211_hw *hw,
 
 err_out:
 	rtw_err(rtwdev, "failed to set supported band\n");
-	kfree(sband);
 }
 
 static void rtw_unset_supported_band(struct ieee80211_hw *hw,