From 3bea03e7b4680c9c856256c18ce963af6c895822 Mon Sep 17 00:00:00 2001
From: Samuel Holland <samuel@sholland.org>
Date: Sun, 20 Oct 2019 21:28:18 -0500
Subject: [PATCH] allwinner: a64: power: Remove duplicate DT check

should_enable_regulator() is already checked in the regulators subnode
loop before setup_regulator() is called, so there's no need to check it
again here.

Signed-off-by: Samuel Holland <samuel@sholland.org>
Change-Id: Idb8b8a6e435246f4fb226bc84813449d80a0a977
---
 plat/allwinner/sun50i_a64/sunxi_power.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/plat/allwinner/sun50i_a64/sunxi_power.c b/plat/allwinner/sun50i_a64/sunxi_power.c
index d14ced9dc..bd6c7eea0 100644
--- a/plat/allwinner/sun50i_a64/sunxi_power.c
+++ b/plat/allwinner/sun50i_a64/sunxi_power.c
@@ -203,9 +203,6 @@ static int setup_regulator(const void *fdt, int node,
 	int mvolt;
 	uint8_t regval;
 
-	if (!should_enable_regulator(fdt, node))
-		return -ENOENT;
-
 	mvolt = fdt_get_regulator_millivolt(fdt, node);
 	if (mvolt < reg->min_volt || mvolt > reg->max_volt)
 		return -EINVAL;
-- 
GitLab