[PATCH 1/5] spmi: msm: Remove wrong and unused code

Alexey Minnekhanov alexeymin at postmarketos.org
Mon Jan 16 01:33:11 CET 2023


Variable err is never initialized and therefore not needed,
as well as the whole error handler block; the mentioned
"APID->PPID mapping table" is never read in the code anyways.

Signed-off-by: Alexey Minnekhanov <alexeymin at postmarketos.org>
---
 drivers/spmi/spmi-msm.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/spmi/spmi-msm.c b/drivers/spmi/spmi-msm.c
index 27a035c0a595..a9dcf5ab7f91 100644
--- a/drivers/spmi/spmi-msm.c
+++ b/drivers/spmi/spmi-msm.c
@@ -190,7 +190,6 @@ static int msm_spmi_probe(struct udevice *dev)
 	u32 hw_ver;
 	u32 version;
 	int i;
-	int err;
 
 	config_addr = dev_read_addr_index(dev, 0);
 	priv->spmi_core = dev_read_addr_index(dev, 1);
@@ -210,11 +209,6 @@ static int msm_spmi_probe(struct udevice *dev)
 		priv->arb_ver = V5;
 		version = 5;
 		priv->arb_chnl = config_addr + APID_MAP_OFFSET_V5;
-
-		if (err) {
-			dev_err(dev, "could not read APID->PPID mapping table, rc= %d\n", err);
-			return -1;
-		}
 	}
 
 	dev_dbg(dev, "PMIC Arb Version-%d (0x%x)\n", version, hw_ver);
-- 
2.38.2



More information about the U-Boot mailing list