From: cgel.zte@gmail.com
To: aaro.koskinen@iki.fi, jmkrzyszt@gmail.com, tony@atomide.com
Cc: linux@armlinux.org.uk, linux-arm-kernel@lists.infradead.org,
linux-omap@vger.kernel.org, linux-kernel@vger.kernel.org,
Jinpeng Cui <cui.jinpeng2@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: [PATCH linux-next] ARM: omap1: remove redundant variables err
Date: Tue, 30 Aug 2022 14:21:36 +0000 [thread overview]
Message-ID: <20220830142136.299373-1-cui.jinpeng2@zte.com.cn> (raw)
From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
Rturn value directly from platform_device_register()
instead of getting value from redundant variable err.
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
---
arch/arm/mach-omap1/board-ams-delta.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 651c28d81132..e5531ef0fbde 100644
--- a/arch/arm/mach-omap1/board-ams-delta.c
+++ b/arch/arm/mach-omap1/board-ams-delta.c
@@ -822,8 +822,6 @@ static int __init modem_nreset_init(void)
*/
static int __init ams_delta_modem_init(void)
{
- int err;
-
if (!machine_is_ams_delta())
return -ENODEV;
@@ -832,9 +830,7 @@ static int __init ams_delta_modem_init(void)
/* Initialize the modem_nreset regulator consumer before use */
modem_priv.regulator = ERR_PTR(-ENODEV);
- err = platform_device_register(&ams_delta_modem_device);
-
- return err;
+ return platform_device_register(&ams_delta_modem_device);
}
arch_initcall_sync(ams_delta_modem_init);
--
2.25.1
next reply other threads:[~2022-08-30 14:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-30 14:21 cgel.zte [this message]
2022-09-05 20:46 ` Janusz Krzysztofik
2023-03-27 7:11 ` Tony Lindgren
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=20220830142136.299373-1-cui.jinpeng2@zte.com.cn \
--to=cgel.zte@gmail.com \
--cc=aaro.koskinen@iki.fi \
--cc=cui.jinpeng2@zte.com.cn \
--cc=jmkrzyszt@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=tony@atomide.com \
--cc=zealci@zte.com.cn \
/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
all inboxes | Powered by JetHome®