usb: musb: debugfs: musb_exit_debugfs() can be called on probe
when we fail to probe(), we can call musb_exit_debugfs(). Allow that by removing section annotations. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
e618834ef9
commit
b0f9da7e02
@@ -2056,12 +2056,12 @@ bad_config:
|
|||||||
|
|
||||||
status = musb_init_debugfs(musb);
|
status = musb_init_debugfs(musb);
|
||||||
if (status < 0)
|
if (status < 0)
|
||||||
goto fail2;
|
goto fail4;
|
||||||
|
|
||||||
#ifdef CONFIG_SYSFS
|
#ifdef CONFIG_SYSFS
|
||||||
status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group);
|
status = sysfs_create_group(&musb->controller->kobj, &musb_attr_group);
|
||||||
if (status)
|
if (status)
|
||||||
goto fail4;
|
goto fail5;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n",
|
dev_info(dev, "USB %s mode controller at %p using %s, IRQ %d\n",
|
||||||
@@ -2078,6 +2078,9 @@ bad_config:
|
|||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
fail5:
|
||||||
|
musb_exit_debugfs(musb);
|
||||||
|
|
||||||
fail4:
|
fail4:
|
||||||
if (!is_otg_enabled(musb) && is_host_enabled(musb))
|
if (!is_otg_enabled(musb) && is_host_enabled(musb))
|
||||||
usb_remove_hcd(musb_to_hcd(musb));
|
usb_remove_hcd(musb_to_hcd(musb));
|
||||||
|
@@ -289,7 +289,7 @@ err0:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void __exit musb_exit_debugfs(struct musb *musb)
|
void /* __init_or_exit */ musb_exit_debugfs(struct musb *musb)
|
||||||
{
|
{
|
||||||
debugfs_remove_recursive(musb_debugfs_root);
|
debugfs_remove_recursive(musb_debugfs_root);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user