Commit 1055790b authored by Julia Lawall's avatar Julia Lawall Committed by Jacek Anaszewski

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: default avatarJulia Lawall <Julia.Lawall@lip6.fr>
Acked-by: default avatarPavel Machek <pavel@ucw.cz>
Signed-off-by: default avatarJacek Anaszewski <jacek.anaszewski@gmail.com>
parent 5771a8c0
...@@ -232,9 +232,8 @@ tlc591xx_probe(struct i2c_client *client, ...@@ -232,9 +232,8 @@ tlc591xx_probe(struct i2c_client *client,
err = of_property_read_u32(child, "reg", &reg); err = of_property_read_u32(child, "reg", &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 =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment