From fe2eb7221870ed30da06a64ddc0eac0501eb615f Mon Sep 17 00:00:00 2001 From: Sachin Kamat Date: Tue, 18 Feb 2014 16:11:06 +0530 Subject: [PATCH] regulator: da9055: Do not hardcode return value Propagate the error value returned by the function instead. Signed-off-by: Sachin Kamat Signed-off-by: Mark Brown --- drivers/regulator/da9055-regulator.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/regulator/da9055-regulator.c b/drivers/regulator/da9055-regulator.c index 604a6f7c9cbf..8812855f2b33 100644 --- a/drivers/regulator/da9055-regulator.c +++ b/drivers/regulator/da9055-regulator.c @@ -567,7 +567,7 @@ static int da9055_regulator_dt_init(struct platform_device *pdev, of_node_put(nproot); if (ret < 0) { dev_err(&pdev->dev, "Error matching regulator: %d\n", ret); - return -ENODEV; + return ret; } config->init_data = da9055_reg_matches[regid].init_data;