diff options
Diffstat (limited to 'drivers/leds')
-rw-r--r-- | drivers/leds/leds-lp5521.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/leds/leds-lp5521.c b/drivers/leds/leds-lp5521.c index 9fc122c81f06..16f281b8c2d0 100644 --- a/drivers/leds/leds-lp5521.c +++ b/drivers/leds/leds-lp5521.c | |||
@@ -175,14 +175,14 @@ static int lp5521_set_engine_mode(struct lp5521_engine *engine, u8 mode) | |||
175 | mode = LP5521_CMD_DIRECT; | 175 | mode = LP5521_CMD_DIRECT; |
176 | 176 | ||
177 | ret = lp5521_read(client, LP5521_REG_OP_MODE, &engine_state); | 177 | ret = lp5521_read(client, LP5521_REG_OP_MODE, &engine_state); |
178 | if (ret < 0) | ||
179 | return ret; | ||
178 | 180 | ||
179 | /* set mode only for this engine */ | 181 | /* set mode only for this engine */ |
180 | engine_state &= ~(engine->engine_mask); | 182 | engine_state &= ~(engine->engine_mask); |
181 | mode &= engine->engine_mask; | 183 | mode &= engine->engine_mask; |
182 | engine_state |= mode; | 184 | engine_state |= mode; |
183 | ret |= lp5521_write(client, LP5521_REG_OP_MODE, engine_state); | 185 | return lp5521_write(client, LP5521_REG_OP_MODE, engine_state); |
184 | |||
185 | return ret; | ||
186 | } | 186 | } |
187 | 187 | ||
188 | static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern) | 188 | static int lp5521_load_program(struct lp5521_engine *eng, const u8 *pattern) |