usb: gadget: function: phonet: balance usb_ep_disable calls
f_phonet's ->set_alt() method will call usb_ep_disable() potentially on an endpoint which is already disabled. That's something the gadget/function driver must guarantee that it's always balanced. In order to balance the calls, just make sure the endpoint was enabled before by means of checking the validity of driver_data. Reported-by: NPali Rohár <pali.rohar@gmail.com> Signed-off-by: NFelipe Balbi <balbi@ti.com>
Showing
想要评论请 注册 或 登录