[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230120070731.383729-2-s-vadapalli@ti.com>
Date: Fri, 20 Jan 2023 12:37:30 +0530
From: Siddharth Vadapalli <s-vadapalli@...com>
To: <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
<linux@...linux.org.uk>, <pabeni@...hat.com>, <rogerq@...nel.org>,
<leon@...nel.org>
CC: <leonro@...dia.com>, <anthony.l.nguyen@...el.com>,
<netdev@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>, <vigneshr@...com>,
<srk@...com>, <s-vadapalli@...com>
Subject: [PATCH net-next v5 1/2] net: ethernet: ti: am65-cpsw: Delete unreachable error handling code
The am65_cpts_create() function returns -EOPNOTSUPP only when the config
"CONFIG_TI_K3_AM65_CPTS" is disabled. Also, in the am65_cpsw_init_cpts()
function, am65_cpts_create() can only be invoked if the config
"CONFIG_TI_K3_AM65_CPTS" is enabled. Thus, the error handling code for the
case in which the return value of am65_cpts_create() is -EOPNOTSUPP, is
unreachable. Hence delete it.
Reported-by: Leon Romanovsky <leon@...nel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@...com>
Reviewed-by: Leon Romanovsky <leonro@...dia.com>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@...el.com>
Reviewed-by: Roger Quadros <rogerq@...nel.org>
---
drivers/net/ethernet/ti/am65-cpsw-nuss.c | 5 -----
1 file changed, 5 deletions(-)
diff --git a/drivers/net/ethernet/ti/am65-cpsw-nuss.c b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
index c696da89962f..fde4800cf81a 100644
--- a/drivers/net/ethernet/ti/am65-cpsw-nuss.c
+++ b/drivers/net/ethernet/ti/am65-cpsw-nuss.c
@@ -1937,11 +1937,6 @@ static int am65_cpsw_init_cpts(struct am65_cpsw_common *common)
int ret = PTR_ERR(cpts);
of_node_put(node);
- if (ret == -EOPNOTSUPP) {
- dev_info(dev, "cpts disabled\n");
- return 0;
- }
-
dev_err(dev, "cpts create err %d\n", ret);
return ret;
}
--
2.25.1
Powered by blists - more mailing lists