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>
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 =