From: Markus Elfring <Markus.Elfring@web.de>
To: Qinglang Miao <miaoqinglang@huawei.com>, linux-m68k@lists.linux-m68k.org
Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org,
Geert Uytterhoeven <geert@linux-m68k.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Stephen Rothwell <sfr@canb.auug.org.au>
Subject: Re: [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices()
Date: Tue, 28 Jul 2020 16:50:06 +0200 [thread overview]
Message-ID: <1e12105b-aa72-11a2-74f6-c789f8ceaaa3@web.de> (raw)
> Add the missing platform_device_unregister() before return
> from amiga_init_devices() in the error handling case.
Will the tag “Fixes” become helpful for the commit message?
…
> +++ b/arch/m68k/amiga/platform.c
> @@ -188,8 +188,10 @@ static int __init amiga_init_devices(void)
> return PTR_ERR(pdev);
> error = platform_device_add_data(pdev, &a1200_ide_pdata,
> sizeof(a1200_ide_pdata));
> - if (error)
> + if (error) {
> + platform_device_unregister(pdev);
> return error;
> + }
> }
…
I suggest to add a jump target for the desired exception handling.
if (error)
+ goto unregister_device;
Regards,
Markus
next reply other threads:[~2020-07-28 14:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-28 14:50 Markus Elfring [this message]
2020-07-28 15:54 ` [PATCH] m68k/amiga: Add missing platform_device_unregister() call in amiga_init_devices() Greg Kroah-Hartman
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=1e12105b-aa72-11a2-74f6-c789f8ceaaa3@web.de \
--to=markus.elfring@web.de \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=miaoqinglang@huawei.com \
--cc=sfr@canb.auug.org.au \
/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).