leds: leds-lp5521: return an error code on error in probe()
If "buf" wasn't equal to LP5521_REG_R_CURR_DEFAULT the probe fails but we still return zero. I've changed it to print an error message and return -EINVAL. Reported-by: Ben Hutchings <ben@decadent.org.uk> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Bryan Wu <cooloney@gmail.com>
Showing
Please register or sign in to comment