Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -232,9 +232,8 @@ tlc591xx_probe(struct i2c_client *client,
		err = of_property_read_u32(child, "reg", &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 =