All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] leds: aw200xx: Fix error code in probe()
@ 2023-06-23 12:09 Dan Carpenter
  2023-07-12 14:24 ` Lee Jones
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2023-06-23 12:09 UTC (permalink / raw)
  To: Martin Kurbanov
  Cc: Pavel Machek, Lee Jones, Andy Shevchenko, linux-leds,
	kernel-janitors

The "ret" variable is zero/success here.  Don't return that, return
-EINVAL instead.

Fixes: 36a87f371b7a ("leds: Add AW20xx driver")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
---
 drivers/leds/leds-aw200xx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/leds/leds-aw200xx.c b/drivers/leds/leds-aw200xx.c
index 96979b8e09b7..7b996bc01c46 100644
--- a/drivers/leds/leds-aw200xx.c
+++ b/drivers/leds/leds-aw200xx.c
@@ -368,7 +368,7 @@ static int aw200xx_probe_fw(struct device *dev, struct aw200xx *chip)
 
 	if (!chip->display_rows ||
 	    chip->display_rows > chip->cdef->display_size_rows_max) {
-		return dev_err_probe(dev, ret,
+		return dev_err_probe(dev, -EINVAL,
 				     "Invalid leds display size %u\n",
 				     chip->display_rows);
 	}
-- 
2.39.2


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

end of thread, other threads:[~2023-07-12 14:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-23 12:09 [PATCH] leds: aw200xx: Fix error code in probe() Dan Carpenter
2023-07-12 14:24 ` Lee Jones

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.