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 <Julia.Lawall@lip6.fr> Acked-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Jacek Anaszewski <jacek.anaszewski@gmail.com>
This commit is contained in:
parent
5771a8c088
commit
1055790b0d
|
@ -232,9 +232,8 @@ tlc591xx_probe(struct i2c_client *client,
|
||||||
err = of_property_read_u32(child, "reg", ®);
|
err = of_property_read_u32(child, "reg", ®);
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
if (reg < 0 || reg >= tlc591xx->max_leds)
|
if (reg < 0 || reg >= tlc591xx->max_leds ||
|
||||||
return -EINVAL;
|
priv->leds[reg].active)
|
||||||
if (priv->leds[reg].active)
|
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
priv->leds[reg].active = true;
|
priv->leds[reg].active = true;
|
||||||
priv->leds[reg].ldev.name =
|
priv->leds[reg].ldev.name =
|
||||||
|
|
Loading…
Reference in New Issue