mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
LEDS: propagate error codes in blinkm_detect()
Use the error codes from the lower levels instead of -ENODEV. Signed-off-by: Dan Carpenter <[email protected]> Acked-by: Jan-Simon Möller <[email protected]> Signed-off-by: Bryan Wu <[email protected]>
This commit is contained in:
parent
4d8729a139
commit
18d4a06f9b
1 changed files with 2 additions and 2 deletions
|
|
@ -617,11 +617,11 @@ static int blinkm_detect(struct i2c_client *client, struct i2c_board_info *info)
|
|||
/* Step 1: Read BlinkM address back - cmd_char 'a' */
|
||||
ret = blinkm_write(client, BLM_GET_ADDR, NULL);
|
||||
if (ret < 0)
|
||||
return -ENODEV;
|
||||
return ret;
|
||||
usleep_range(20000, 30000); /* allow a small delay */
|
||||
ret = blinkm_read(client, BLM_GET_ADDR, tmpargs);
|
||||
if (ret < 0)
|
||||
return -ENODEV;
|
||||
return ret;
|
||||
|
||||
if (tmpargs[0] != 0x09) {
|
||||
dev_err(&client->dev, "enodev DEV ADDR = 0x%02X\n", tmpargs[0]);
|
||||
|
|
|
|||
Loading…
Reference in a new issue