Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73edd2b1 authored by Bjorn Helgaas's avatar Bjorn Helgaas
Browse files

PCI: rockchip: Unindent rockchip_pcie_set_power_limit()



If regulator_get_current_limit() returns 0 or error, return early so the
body of the function doesn't have to be indented as the body of an "if"
statement.  No functional change intended.

Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
parent 5fcaa005
Loading
Loading
Loading
Loading
+17 −16
Original line number Diff line number Diff line
@@ -438,7 +438,9 @@ static void rockchip_pcie_set_power_limit(struct rockchip_pcie *rockchip)
	 * to the actual power supply.
	 */
	curr = regulator_get_current_limit(rockchip->vpcie3v3);
	if (curr > 0) {
	if (curr <= 0)
		return;

	scale = 3; /* 0.001x */
	curr = curr / 1000; /* convert to mA */
	power = (curr * 3300) / 1000; /* milliwatt */
@@ -456,7 +458,6 @@ static void rockchip_pcie_set_power_limit(struct rockchip_pcie *rockchip)
		  (scale << PCIE_RC_CONFIG_DCR_CPLS_SHIFT);
	rockchip_pcie_write(rockchip, status, PCIE_RC_CONFIG_DCR);
}
}

/**
 * rockchip_pcie_init_port - Initialize hardware