From: Suman Anna <s-anna@ti.com>
To: Arvind Yadav <arvind.yadav.cs@gmail.com>, <jassisinghbrar@gmail.com>
Cc: <linux-kernel@vger.kernel.org>, <linux-pm@vger.kernel.org>
Subject: Re: [PATCH] mailbox/omap: unregister mbox class
Date: Mon, 13 Nov 2017 10:28:30 -0600 [thread overview]
Message-ID: <fbb176b6-d479-a5b5-af47-34267d97a6dd@ti.com> (raw)
In-Reply-To: <014a4c5cd6008a42621d45f34d57b9e1a72d3c76.1510423634.git.arvind.yadav.cs@gmail.com>
On 11/11/2017 12:09 PM, Arvind Yadav wrote:
> 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>
regards
Suman
> ---
> drivers/mailbox/omap-mailbox.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mailbox/omap-mailbox.c b/drivers/mailbox/omap-mailbox.c
> index c5e8b9c..2517038 100644
> --- a/drivers/mailbox/omap-mailbox.c
> +++ b/drivers/mailbox/omap-mailbox.c
> @@ -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);
>
>
prev parent reply other threads:[~2017-11-13 16:28 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-11 18:09 [PATCH] mailbox/omap: unregister mbox class Arvind Yadav
2017-11-13 16:28 ` Suman Anna [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fbb176b6-d479-a5b5-af47-34267d97a6dd@ti.com \
--to=s-anna@ti.com \
--cc=arvind.yadav.cs@gmail.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).