]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
regulator: da9063: fix assignment of da9063_reg_matches to NULL
authorColin Ian King <colin.king@canonical.com>
Tue, 11 Mar 2014 11:25:09 +0000 (11:25 +0000)
committerMark Brown <broonie@linaro.org>
Tue, 11 Mar 2014 19:05:05 +0000 (19:05 +0000)
cppcheck detected an incorrect assignment:

 drivers/regulator/da9063-regulator.c:711]: (warning) Assignment
 of function parameter has no effect outside the function

the original code didn't do anything, instead, *da9063_reg_matches
needs to be set to NULL.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/da9063-regulator.c

index 4c09f759d05d3e99baffd82a0076618330ba590e..6027bd5acc3e8a7f778fb3475c3d0bce574097be 100644 (file)
@@ -709,7 +709,7 @@ static struct da9063_regulators_pdata *da9063_parse_regulators_dt(
                struct platform_device *pdev,
                struct of_regulator_match **da9063_reg_matches)
 {
-       da9063_reg_matches = NULL;
+       *da9063_reg_matches = NULL;
        return ERR_PTR(-ENODEV);
 }
 #endif