linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mfd: adp5585: Drop useless return statement
@ 2025-07-17 14:51 Nuno Sá via B4 Relay
  2025-07-31  9:02 ` (subset) " Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Nuno Sá via B4 Relay @ 2025-07-17 14:51 UTC (permalink / raw)
  To: linux-kernel, linux-gpio; +Cc: Laurent Pinchart, Lee Jones, Dan Carpenter

From: Nuno Sá <nuno.sa@analog.com>

In adp5585_reset_ev_parse(), when parsing the
adi,reset-pulse-width-us property, we were returning in case it was
found and valid. No point in doing that as we'll be returning anyways
after the exiting the property scope. And it could actually lead to bugs
if new properties happen to added after this one.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Closes: https://lore.kernel.org/linux-gpio/c85604d9e077511b8aa6ee0786579594cc0103d4.camel@gmail.com/T/#ma25557bd06ccd2531dc9c85ba6be74af781b81aa
Signed-off-by: Nuno Sá <nuno.sa@analog.com>
---
 drivers/mfd/adp5585.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/mfd/adp5585.c b/drivers/mfd/adp5585.c
index 58f7cebe2ea4f2c68f64370449f5fbce8a2f14ed..46b3ce3d7bae8981824a957f6b4ee471d803c981 100644
--- a/drivers/mfd/adp5585.c
+++ b/drivers/mfd/adp5585.c
@@ -432,7 +432,6 @@ static int adp5585_reset_ev_parse(struct adp5585_dev *adp5585)
 					     "Invalid value(%u) for adi,reset-pulse-width-us\n",
 					     prop_val);
 		}
-		return ret;
 	}
 
 	return 0;

---
base-commit: 8f3ef4da96dd3f3e12f6313cbe8cd16a39e9abae
change-id: 20250717-adp5585-drop-ret-6b110977a0ad
--

Thanks!
- Nuno Sá



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

* Re: (subset) [PATCH] mfd: adp5585: Drop useless return statement
  2025-07-17 14:51 [PATCH] mfd: adp5585: Drop useless return statement Nuno Sá via B4 Relay
@ 2025-07-31  9:02 ` Lee Jones
  0 siblings, 0 replies; 2+ messages in thread
From: Lee Jones @ 2025-07-31  9:02 UTC (permalink / raw)
  To: linux-kernel, linux-gpio, Nuno Sá
  Cc: Laurent Pinchart, Lee Jones, Dan Carpenter

On Thu, 17 Jul 2025 15:51:34 +0100, Nuno Sá wrote:
> In adp5585_reset_ev_parse(), when parsing the
> adi,reset-pulse-width-us property, we were returning in case it was
> found and valid. No point in doing that as we'll be returning anyways
> after the exiting the property scope. And it could actually lead to bugs
> if new properties happen to added after this one.
> 
> 
> [...]

Applied, thanks!

[1/1] mfd: adp5585: Drop useless return statement
      commit: 649c3af846064d9f721e976295db7bcc7ad2bffe

--
Lee Jones [李琼斯]


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

end of thread, other threads:[~2025-07-31  9:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-17 14:51 [PATCH] mfd: adp5585: Drop useless return statement Nuno Sá via B4 Relay
2025-07-31  9:02 ` (subset) " Lee Jones

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