linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH linux-next] ARM: omap1: remove redundant variables err
@ 2022-08-30 14:21 cgel.zte
  2022-09-05 20:46 ` Janusz Krzysztofik
  2023-03-27  7:11 ` Tony Lindgren
  0 siblings, 2 replies; 3+ messages in thread
From: cgel.zte @ 2022-08-30 14:21 UTC (permalink / raw)
  To: aaro.koskinen, jmkrzyszt, tony
  Cc: linux, linux-arm-kernel, linux-omap, linux-kernel, Jinpeng Cui,
	Zeal Robot

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] ARM: omap1: remove redundant variables err
  2022-08-30 14:21 [PATCH linux-next] ARM: omap1: remove redundant variables err cgel.zte
@ 2022-09-05 20:46 ` Janusz Krzysztofik
  2023-03-27  7:11 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Janusz Krzysztofik @ 2022-09-05 20:46 UTC (permalink / raw)
  To: Aaro Koskinen, Tony Lindgren, cgel.zte
  Cc: Russell King, linux-arm Mailing List, Linux OMAP Mailing List,
	Linux Kernel Mailing List, Jinpeng Cui, Zeal Robot

On Tuesday, 30 August 2022 16:21:36 CEST cgel.zte@gmail.com wrote:
> 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>

Acked-by: Janusz Krzysztofik <jmkrzyszt@gmail.com>

Note: The same change, form a different author @zte.com.cn, with a different
wording in commit message and description, was submitted a few hours before
this one.  However, I decided to respond with my Ack to this one because
the other one was not sent to linux-omap@vger.kernel.org, then it didn't
reach OMAP patchwork.  If my decision is not in line with some
recommendations and I should rather prefer the submission sent earlier then
please let me know and I'll respond with my Ack to it as well.

Thanks,
Janusz


> ---
>  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);
>
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH linux-next] ARM: omap1: remove redundant variables err
  2022-08-30 14:21 [PATCH linux-next] ARM: omap1: remove redundant variables err cgel.zte
  2022-09-05 20:46 ` Janusz Krzysztofik
@ 2023-03-27  7:11 ` Tony Lindgren
  1 sibling, 0 replies; 3+ messages in thread
From: Tony Lindgren @ 2023-03-27  7:11 UTC (permalink / raw)
  To: cgel.zte
  Cc: aaro.koskinen, jmkrzyszt, linux, linux-arm-kernel, linux-omap,
	linux-kernel, Jinpeng Cui, Zeal Robot

* cgel.zte@gmail.com <cgel.zte@gmail.com> [220830 17:14]:
> From: Jinpeng Cui <cui.jinpeng2@zte.com.cn>
> 
> Rturn value directly from platform_device_register()
> instead of getting value from redundant variable err.

Sorry looks like this is still pending, applying into
omap-for-v6.4/omap1 thanks.

Tony

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-03-27  7:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-30 14:21 [PATCH linux-next] ARM: omap1: remove redundant variables err cgel.zte
2022-09-05 20:46 ` Janusz Krzysztofik
2023-03-27  7:11 ` Tony Lindgren

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).