Commit ad5152b8 authored by Dan Carpenter's avatar Dan Carpenter Committed by Lee Jones

leds: aw200xx: Fix error code in probe()

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

Fixes: 36a87f37 ("leds: Add AW20xx driver")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/4d791b69-01c7-4532-818c-63712d3f63e1@moroto.mountainSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 8766addf
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment