Commit 1f90a216 authored by Arvind Yadav's avatar Arvind Yadav Committed by Jassi Brar

mailbox/omap: unregister mbox class

platform_driver_register() can fail here and we must unregister mbox
class.
Signed-off-by: default avatarArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent e339c80a
......@@ -906,7 +906,11 @@ static int __init omap_mbox_init(void)
mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size,
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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment