net: usbnet: Fix error handling in usbnet_probe()
In current code if any error occurs after register_netdev() call in
usbnet_probe(), then wihtout calling unregister_netdev() in exit,
free_netdev() is called which leads to a BUG_ON in free_netdev().
Fix this by calling unregister_netdev() in case of failure.
Also fix memory leaks by freeing the ipa context and ipa resources
in case of failures.
Change-Id: Id31451d1dbbf857a9d40dd431a5c6476fcfefab1
Signed-off-by:
Azhar Shaikh <azhars@codeaurora.org>
Loading
Please register or sign in to comment