usb: gadget: qc_rndis: Properly handle rndis_ipa_init failure
Currently if rndis_ipa_init() fails port->func doesn't get
removed from the configuration list, and will lead to a
use-after-free when the calling function later tries to remove
the function. Fix this to handle the failure gracefully and only
call usb_add_function() if it succeeded.
Change-Id: I2ad0dfeaea6b5b6ba1e47aad564ac052348677e6
Signed-off-by:
Jack Pham <jackp@codeaurora.org>
Loading
Please register or sign in to comment