[PATCH] regulator: da9063: fix assignment of da9063_reg_matches to NULL

From: Colin King
Date: Tue Mar 11 2014 - 07:25:22 EST


From: Colin Ian King <colin.king@xxxxxxxxxxxxx>

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@xxxxxxxxxxxxx>
---
drivers/regulator/da9063-regulator.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/regulator/da9063-regulator.c b/drivers/regulator/da9063-regulator.c
index 91e99a2..d3ccd54 100644
--- a/drivers/regulator/da9063-regulator.c
+++ b/drivers/regulator/da9063-regulator.c
@@ -710,7 +710,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
--
1.9.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/