mirror of
https://github.com/torvalds/linux.git
synced 2026-05-24 15:12:13 +02:00
leds: aw200xx: Fix error code in probe()
The "ret" variable is zero/success here. Don't return that, return
-EINVAL instead.
Fixes: 36a87f371b ("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>
This commit is contained in:
parent
8766addf66
commit
ad5152b85e
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user