mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-27 00:51:35 +00:00
mailbox/omap: unregister mbox class
platform_driver_register() can fail here and we must unregister mbox class. Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com> Acked-by: Suman Anna <s-anna@ti.com> Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
This commit is contained in:
parent
e339c80af9
commit
1f90a2162f
1 changed files with 5 additions and 1 deletions
|
@ -906,7 +906,11 @@ static int __init omap_mbox_init(void)
|
||||||
mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size,
|
mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size,
|
||||||
sizeof(mbox_msg_t));
|
sizeof(mbox_msg_t));
|
||||||
|
|
||||||
return platform_driver_register(&omap_mbox_driver);
|
err = platform_driver_register(&omap_mbox_driver);
|
||||||
|
if (err)
|
||||||
|
class_unregister(&omap_mbox_class);
|
||||||
|
|
||||||
|
return err;
|
||||||
}
|
}
|
||||||
subsys_initcall(omap_mbox_init);
|
subsys_initcall(omap_mbox_init);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue