Author: Diego Liziero <diegoliz@gmail.com> When regulator_desc->type is something different from REGULATOR_VOLTAGE or REGULATOR_CURRENT the if should probably return ERR_PTR(-EINVAL) The semantic patch that makes this change is as follows: (http://www.emn.fr/x-info/coccinelle/) @@ expression E; constant C; @@ ( – !E == C + E != C ) Signed-off-by: Diego Liziero Acked-by: Mark Brown Signed-off-by: Liam Girdwood …