Unverified Commit 54ad6c45 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!15677 regulator: pfuze100: Fix refcount leak in pfuze_parse_regulators_dt

parents 6af42fee 4d2106bf
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -495,6 +495,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip)
	parent = of_get_child_by_name(np, "regulators");
	if (!parent) {
		dev_err(dev, "regulators node not found\n");
		of_node_put(np);
		return -EINVAL;
	}

@@ -524,6 +525,7 @@ static int pfuze_parse_regulators_dt(struct pfuze_chip *chip)
	}

	of_node_put(parent);
	of_node_put(np);
	if (ret < 0) {
		dev_err(dev, "Error parsing regulator init data: %d\n",
			ret);