[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231016101608.993921-3-n-francis@ti.com>
Date: Mon, 16 Oct 2023 15:46:07 +0530
From: Neha Malcom Francis <n-francis@...com>
To: <nm@...com>, <ssantosh@...nel.org>, <t-konduru@...com>
CC: <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <n-francis@...com>,
<u-kumar1@...com>
Subject: [PATCH v3 2/3] soc: ti: k3-socinfo: Avoid overriding ret
Avoid overriding the return value and make sure the right error code is
reflected. Here, if the partno is none of the identified partnos present
in k3_soc_ids[], return -ENODEV.
Signed-off-by: Neha Malcom Francis <n-francis@...com>
---
Changes since v2:
- new patch
drivers/soc/ti/k3-socinfo.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/soc/ti/k3-socinfo.c b/drivers/soc/ti/k3-socinfo.c
index d45f5cb955a6..7fc3548e084c 100644
--- a/drivers/soc/ti/k3-socinfo.c
+++ b/drivers/soc/ti/k3-socinfo.c
@@ -60,7 +60,7 @@ k3_chipinfo_partno_to_names(unsigned int partno,
return 0;
}
- return -EINVAL;
+ return -ENODEV;
}
static int k3_chipinfo_probe(struct platform_device *pdev)
@@ -111,8 +111,7 @@ static int k3_chipinfo_probe(struct platform_device *pdev)
ret = k3_chipinfo_partno_to_names(partno_id, soc_dev_attr);
if (ret) {
- dev_err(dev, "Unknown SoC JTAGID[0x%08X]\n", jtag_id);
- ret = -ENODEV;
+ dev_err(dev, "Unknown SoC JTAGID[0x%08X]: %d\n", jtag_id, ret);
goto err_free_rev;
}
--
2.34.1
Powered by blists - more mailing lists