Skip to content

Commit

Permalink
rndis_wlan: Remove redundant NULL check before kfree
Browse files Browse the repository at this point in the history
kfree on a NULL pointer is a no-op.

Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
Acked-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
  • Loading branch information
Syam Sidhardhan authored and John W. Linville committed Mar 6, 2013
1 parent 7626cf1 commit cd3d03d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/net/wireless/rndis_wlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -2839,8 +2839,7 @@ static void rndis_wlan_do_link_up_work(struct usbnet *usbdev)
} else if (priv->infra_mode == NDIS_80211_INFRA_ADHOC)
cfg80211_ibss_joined(usbdev->net, bssid, GFP_KERNEL);

if (info != NULL)
kfree(info);
kfree(info);

priv->connected = true;
memcpy(priv->bssid, bssid, ETH_ALEN);
Expand Down

0 comments on commit cd3d03d

Please sign in to comment.