[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220830142136.299373-1-cui.jinpeng2@zte.com.cn>
Date: Tue, 30 Aug 2022 14:21:36 +0000
From: cgel.zte@...il.com
To: aaro.koskinen@....fi, jmkrzyszt@...il.com, tony@...mide.com
Cc: linux@...linux.org.uk, linux-arm-kernel@...ts.infradead.org,
linux-omap@...r.kernel.org, linux-kernel@...r.kernel.org,
Jinpeng Cui <cui.jinpeng2@....com.cn>,
Zeal Robot <zealci@....com.cn>
Subject: [PATCH linux-next] ARM: omap1: remove redundant variables err
From: Jinpeng Cui <cui.jinpeng2@....com.cn>
Rturn value directly from platform_device_register()
instead of getting value from redundant variable err.
Reported-by: Zeal Robot <zealci@....com.cn>
Signed-off-by: Jinpeng Cui <cui.jinpeng2@....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
Powered by blists - more mailing lists