]> www.infradead.org Git - users/jedix/linux-maple.git/commit
leds: flash: leds-qcom-flash: Test the correct variable in init
authorDan Carpenter <dan.carpenter@linaro.org>
Thu, 4 Jul 2024 15:19:32 +0000 (10:19 -0500)
committerLee Jones <lee@kernel.org>
Thu, 11 Jul 2024 11:46:33 +0000 (12:46 +0100)
commit87e552ad654554be73e62dd43c923bcee215287d
treecbb7b46e78274377959270f55888586aa942c539
parent4137d94fd8726431b8bf3ab329311c59e80f5530
leds: flash: leds-qcom-flash: Test the correct variable in init

This code was passing the incorrect pointer to PTR_ERR_OR_ZERO() so it
always returned success.  It should have been checking the array element
instead of the array itself.

Fixes: 96a2e242a5dc ("leds: flash: Add driver to support flash LED module in QCOM PMICs")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/ZoWJS_epjIMCYITg@stanley.mountain
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/flash/leds-qcom-flash.c