Message ID | 20160912120502.GA52132@lkp-hsx03 (mailing list archive) |
---|---|
State | Not Applicable |
Delegated to: | Kalle Valo |
Headers | show |
--- a/drivers/net/wireless/rsi/rsi_91x_mac80211.c +++ b/drivers/net/wireless/rsi/rsi_91x_mac80211.c @@ -205,8 +205,7 @@ void rsi_mac80211_detach(struct rsi_hw * for(i = 0; i < 2; i++) { struct ieee80211_supported_band *sbands = &adapter->sbands[i]; - if (sbands->channels) - kfree(sbands->channels); + kfree(sbands->channels); } #ifdef CONFIG_RSI_DEBUGFS
drivers/net/wireless/rsi/rsi_91x_mac80211.c:209:3-8: WARNING: NULL check before freeing functions like kfree, debugfs_remove, debugfs_remove_recursive or usb_free_urb is not needed. Maybe consider reorganizing relevant code to avoid passing NULL values. NULL check before some freeing functions is not needed. Based on checkpatch warning "kfree(NULL) is safe this check is probably not required" and kfreeaddr.cocci by Julia Lawall. Generated by: scripts/coccinelle/free/ifnullfree.cocci CC: Prameela Rani Garnepudi <prameela.j04cs@gmail.com> Signed-off-by: Fengguang Wu <fengguang.wu@intel.com> --- rsi_91x_mac80211.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)