Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0ce8ed27 authored by Azhar Shaikh's avatar Azhar Shaikh
Browse files

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: default avatarAzhar Shaikh <azhars@codeaurora.org>
parent 5a26d717
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment