瀏覽代碼

regulator: da9063: fix assignment of da9063_reg_matches to NULL

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>
Colin Ian King 11 年之前
父節點
當前提交
f377ed107b
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/regulator/da9063-regulator.c

+ 1 - 1
drivers/regulator/da9063-regulator.c

@@ -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