소스 검색

regulator: max77686: Add missing of_node_put

Add of_node_put to decrement the ref count.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Mark Brown <broonie@linaro.org>
Sachin Kamat 11 년 전
부모
커밋
da0ee72d6d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      drivers/regulator/max77686.c

+ 2 - 0
drivers/regulator/max77686.c

@@ -412,6 +412,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
 	if (!rdata) {
 		dev_err(&pdev->dev,
 			"could not allocate memory for regulator data\n");
+		of_node_put(regulators_np);
 		return -ENOMEM;
 	}
 
@@ -425,6 +426,7 @@ static int max77686_pmic_dt_parse_pdata(struct platform_device *pdev,
 	}
 
 	pdata->regulators = rdata;
+	of_node_put(regulators_np);
 
 	return 0;
 }