提交 7b3a766c 编写于 作者: R Rahul Ruikar 提交者: Greg Kroah-Hartman

usb: core: endpoint: Fix error path

In function usb_create_ep_devs()
call put_device() when device_register() fails.
Signed-off-by: NRahul Ruikar <rahul.ruikar@gmail.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 93ad03d6
......@@ -202,7 +202,7 @@ int usb_create_ep_devs(struct device *parent,
return retval;
error_register:
kfree(ep_dev);
put_device(&ep_dev->dev);
exit:
return retval;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册