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

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


Signed-off-by: default avatarLee Jones <lee@kernel.org>
parent 8766addf
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
	}