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

Skip to content
Commit 9e85f9e1 authored by Anna Perel's avatar Anna Perel Committed by Stephen Boyd
Browse files

usb: gadget: Fix rndis unregistration



Net device may be unregistered only if its reference counter is 0.
Reference counter is increased by 1 by register_netdev and
dev_get_by_name functions. Since each call of dev_get_by_name
causes a superfluous increase of reference counter,
it must be followed by a call to dev_put,
decreasing reference counter back to its proper value 1.
Otherwise the unregistration of the net_device, decreasing
reference counter by 1 and waiting for it to be 0, will get stuck forever.

CRs-Fixed: 418630
Change-Id: I68c9802ac67b07e5ffd05ddb14be6119fe10a86f
Signed-off-by: default avatarAnna Perel <aperel@codeaurora.org>
parent 83a8993a
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