]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT
authorDiego Liziero <diegoliz@gmail.com>
Tue, 14 Apr 2009 01:04:47 +0000 (03:04 +0200)
committerLiam Girdwood <lrg@slimlogic.co.uk>
Tue, 28 Apr 2009 17:58:07 +0000 (18:58 +0100)
commitdb431c6e92dc8b8114fbb53bbac0a8af49e4744e
tree9b54c41207160b04946a7984dfc863167afc1b1b
parent607a7b044ed46559b5a124585d326af6b309ed73
drivers/regulator: fix when type is different from REGULATOR_VOLTAGE or REGULATOR_CURRENT

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 <diegoliz@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
drivers/regulator/core.c