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

USB: gadget: amd5536udc.c: fix error path

In function udc_probe() call put_device() when device_register() fails.
Signed-off-by: NRahul Ruikar <rahul.ruikar@gmail.com>
Acked-by: NThomas Dahlmann <dahlmann.thomas@arcor.de>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 e581c8c8
......@@ -3383,8 +3383,10 @@ static int udc_probe(struct udc *dev)
udc = dev;
retval = device_register(&dev->gadget.dev);
if (retval)
if (retval) {
put_device(&dev->gadget.dev);
goto finished;
}
/* timer init */
init_timer(&udc_timer);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册