summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap1/board-ams-delta.c
diff options
context:
space:
mode:
authorJinpeng Cui <cui.jinpeng2@zte.com.cn>2022-08-30 14:21:36 +0000
committerTony Lindgren <tony@atomide.com>2023-03-27 10:10:37 +0300
commitc29313d58c42f205cdecdd337f784f59bdf92dd7 (patch)
tree8520509d9e23b81eb5fac8544004e5b6186c5bc8 /arch/arm/mach-omap1/board-ams-delta.c
parent3ea0b91d9b48124b01e30004547238afd6b5a310 (diff)
ARM: omap1: remove redundant variables err
Return 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> Message-Id: <20220830142136.299373-1-cui.jinpeng2@zte.com.cn> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap1/board-ams-delta.c')
-rw-r--r--arch/arm/mach-omap1/board-ams-delta.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/arch/arm/mach-omap1/board-ams-delta.c b/arch/arm/mach-omap1/board-ams-delta.c
index 0f67ac4c6fd2..9108c871d129 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);