Commit c29313d5 authored by Jinpeng Cui's avatar Jinpeng Cui Committed by Tony Lindgren

ARM: omap1: remove redundant variables err

Return value directly from platform_device_register()
instead of getting value from redundant variable err.
Reported-by: default avatarZeal Robot <zealci@zte.com.cn>
Signed-off-by: default avatarJinpeng Cui <cui.jinpeng2@zte.com.cn>
Message-Id: <20220830142136.299373-1-cui.jinpeng2@zte.com.cn>
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
parent 3ea0b91d
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment