summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2013-09-09 11:49:26 (GMT)
committerMark Brown <broonie@linaro.org>2013-09-10 17:11:41 (GMT)
commite8cb204c675e05105ab2c93c73c57607e09d6b41 (patch)
tree3482daeec75be32cfab73c011550f5dfe594f125
parenta584862221426f461f56674d30fe0d712ee63d00 (diff)
downloadlinux-e8cb204c675e05105ab2c93c73c57607e09d6b41.tar.xz
regulator: da9063: Fix PTR_ERR/ERR_PTR mismatch
If CONFIG_OF=n: drivers/regulator/da9063-regulator.c: In function ‘da9063_parse_regulators_dt’: drivers/regulator/da9063-regulator.c:712: warning: passing argument 1 of ‘PTR_ERR’ makes pointer from integer without a cast drivers/regulator/da9063-regulator.c:712: warning: return makes pointer from integer without a cast Use ERR_PTR() to encode an error code in a pointer. PTR_ERR() is meant to decode an error code from a pointer. Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--drivers/regulator/da9063-regulator.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 1a78163..b9f2653 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -709,7 +709,7 @@ static struct da9063_regulators_pdata *da9063_parse_regulators_dt(
struct of_regulator_match **da9063_reg_matches)
{
da9063_reg_matches = NULL;
- return PTR_ERR(-ENODEV);
+ return ERR_PTR(-ENODEV);
}
#endif