[v3,06/12] net/ice/base: remove dead error condition
diff mbox series

Message ID 20191008015018.17086-7-qi.z.zhang@intel.com
State Accepted
Delegated to: xiaolong ye
Headers show
Series
  • net/ice: base code update
Related show

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Qi Zhang Oct. 8, 2019, 1:50 a.m. UTC
The pointer cmd is set to an address of a structure, which can never be
NULL.  Remove the check-for-NULL lines since it's dead code anyway.

Signed-off-by: Jeb Cramer <jeb.j.cramer@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Qiming Yang <qiming.yang@intel.com>
---
 drivers/net/ice/base/ice_common.c | 3 ---
 1 file changed, 3 deletions(-)

Patch
diff mbox series

diff --git a/drivers/net/ice/base/ice_common.c b/drivers/net/ice/base/ice_common.c
index 48ba160f7..4ba3ab202 100644
--- a/drivers/net/ice/base/ice_common.c
+++ b/drivers/net/ice/base/ice_common.c
@@ -176,9 +176,6 @@  ice_aq_get_link_topo_handle(struct ice_port_info *pi, u8 node_type,
 
 	cmd = &desc.params.get_link_topo;
 
-	if (!cmd)
-		return ICE_ERR_PARAM;
-
 	ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo);
 
 	cmd->addr.node_type_ctx = (ICE_AQC_LINK_TOPO_NODE_CTX_PORT <<