mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
leds: tlc591xx: merge conditional tests
Merge conditionals that have the same then branch, to prepare for extending that branch with of_node_put. Signed-off-by: Julia Lawall <[email protected]> Acked-by: Pavel Machek <[email protected]> Signed-off-by: Jacek Anaszewski <[email protected]>
This commit is contained in:
parent
5771a8c088
commit
1055790b0d
1 changed files with 2 additions and 3 deletions
|
|
@ -232,9 +232,8 @@ tlc591xx_probe(struct i2c_client *client,
|
|||
err = of_property_read_u32(child, "reg", ®);
|
||||
if (err)
|
||||
return err;
|
||||
if (reg < 0 || reg >= tlc591xx->max_leds)
|
||||
return -EINVAL;
|
||||
if (priv->leds[reg].active)
|
||||
if (reg < 0 || reg >= tlc591xx->max_leds ||
|
||||
priv->leds[reg].active)
|
||||
return -EINVAL;
|
||||
priv->leds[reg].active = true;
|
||||
priv->leds[reg].ldev.name =
|
||||
|
|
|
|||
Loading…
Reference in a new issue