The parameters to set_consumer_device_supply() can be considered invalid (and hence it could return -EINVAL) if nether consumer_dev nor consumer_dev_name are passed, not when *both* are passed. Signed-off-by: Rajendra Nayak <rnayak@xxxxxx> --- drivers/regulator/core.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index d8e6a42..9365359 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -981,7 +981,7 @@ static int set_consumer_device_supply(struct regulator_dev *rdev, struct regulator_map *node; int has_dev; - if (consumer_dev && consumer_dev_name) + if (!consumer_dev && !consumer_dev_name) return -EINVAL; if (!consumer_dev_name && consumer_dev) -- 1.7.1 -- To unsubscribe from this list: send the line "unsubscribe linux-omap" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html