diff options
author | Dan Carpenter <dan.carpenter@linaro.org> | 2023-06-23 15:09:40 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-07-28 09:26:18 +0100 |
commit | ad5152b85e8bc7dacb1e6e237553fbe779c938e0 (patch) | |
tree | 345ff2e48a49d2130bdc10f102ca226a11d8d5db /drivers/leds | |
parent | 8766addf665e9f0ace15cca894ba225e5a4d580a (diff) | |
download | lwn-ad5152b85e8bc7dacb1e6e237553fbe779c938e0.tar.gz lwn-ad5152b85e8bc7dacb1e6e237553fbe779c938e0.zip |
leds: aw200xx: Fix error code in probe()
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>
Link: https://lore.kernel.org/r/4d791b69-01c7-4532-818c-63712d3f63e1@moroto.mountain
Signed-off-by: Lee Jones <lee@kernel.org>
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-aw200xx.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); } |