提交 ecf85e48 编写于 作者: R Robert Jarzmik 提交者: Greg Kroah-Hartman

USB: otg: Fix bug on remove path without transceiver

In the case where a gadget driver is removed while no
transceiver was found at probe time, a bug in
otg_put_transceiver() will trigger.

Provide symetric calls for otg_get_transceiver() and
otg_put_transceiver(), wherever a transceiver was found or
not.
Signed-off-by: NRobert Jarzmik <robert.jarzmik@free.fr>
Acked-by: NDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 052fbc0d
......@@ -43,6 +43,7 @@ EXPORT_SYMBOL(otg_get_transceiver);
*/
void otg_put_transceiver(struct otg_transceiver *x)
{
if (x)
put_device(x->dev);
}
EXPORT_SYMBOL(otg_put_transceiver);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册