Commit efe8a7fa authored by Raphaël Beamonte's avatar Raphaël Beamonte Committed by Greg Kroah-Hartman

staging: rtl8192u: r8192U_core: fix unnecessary check before kfree code style issue

kfree(NULL) is safe and the checks were not required.
Signed-off-by: default avatarRaphaël Beamonte <raphael.beamonte@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b31c1013
......@@ -1724,10 +1724,9 @@ static void rtl8192_usb_deleteendpoints(struct net_device *dev)
}
kfree(priv->oldaddr);
priv->oldaddr = NULL;
if (priv->pp_rxskb) {
kfree(priv->pp_rxskb);
priv->pp_rxskb = NULL;
}
kfree(priv->pp_rxskb);
priv->pp_rxskb = NULL;
}
#else
void rtl8192_usb_deleteendpoints(struct net_device *dev)
......@@ -1752,11 +1751,9 @@ void rtl8192_usb_deleteendpoints(struct net_device *dev)
priv->rx_urb = NULL;
kfree(priv->oldaddr);
priv->oldaddr = NULL;
if (priv->pp_rxskb) {
kfree(priv->pp_rxskb);
priv->pp_rxskb = 0;
}
kfree(priv->pp_rxskb);
priv->pp_rxskb = 0;
#endif
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment