net: ethernet: ti: am65-cpsw: Delete unreachable error handling code
authorSiddharth Vadapalli <s-vadapalli@ti.com>
Fri, 20 Jan 2023 07:07:30 +0000 (12:37 +0530)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 24 Jan 2023 09:08:50 +0000 (10:08 +0100)
commit0a974b1fff7f8c685a0370a25d6e7150460f7b7d
tree7e2424085efc6754c4d995e36c53b977d519b311
parentd7bf56e0c591e189141430dc8bf4a1b4d0f117a2
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@kernel.org>
Signed-off-by: Siddharth Vadapalli <s-vadapalli@ti.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Reviewed-by: Roger Quadros <rogerq@kernel.org>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/ti/am65-cpsw-nuss.c