diff options
author | Arvind Yadav | 2017-11-11 12:09:18 -0600 |
---|---|---|
committer | Suman Anna | 2017-11-16 10:22:43 -0600 |
commit | ab7fc911eae7081d56506b81626162a58fc3000e (patch) | |
tree | 53717b7e8582247cd4f2d16e0d4573a6e86a4d80 | |
parent | 0a04e85ef301157d4386bb783f12405bdf71f088 (diff) | |
download | mailbox-linux-4.14.y.tar.gz mailbox-linux-4.14.y.tar.xz mailbox-linux-4.14.y.zip |
mailbox/omap: unregister mbox classmailbox-linux-4.14.y
[ Upstream commit 1f90a2162fb3cdfd9c44380bf16209af00f7acbe ]
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>
[s-anna@ti.com: cherry-pick commit '1f90a2162fb3' from v4.15]
Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r-- | drivers/mailbox/omap-mailbox.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c index c5e8b9cb170d..2517038a8452 100644 --- a/drivers/mailbox/omap-mailbox.c +++ b/drivers/mailbox/omap-mailbox.c | |||
@@ -906,7 +906,11 @@ static int __init omap_mbox_init(void) | |||
906 | mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size, | 906 | mbox_kfifo_size = max_t(unsigned int, mbox_kfifo_size, |
907 | sizeof(mbox_msg_t)); | 907 | sizeof(mbox_msg_t)); |
908 | 908 | ||
909 | return platform_driver_register(&omap_mbox_driver); | 909 | err = platform_driver_register(&omap_mbox_driver); |
910 | if (err) | ||
911 | class_unregister(&omap_mbox_class); | ||
912 | |||
913 | return err; | ||
910 | } | 914 | } |
911 | subsys_initcall(omap_mbox_init); | 915 | subsys_initcall(omap_mbox_init); |
912 | 916 | ||