Skip to contentSkip to conversation

net/zxdh: remove unnecessary null free check

PATCH Applied Stephen Hemminger 1 participant 2 messages Sep 24, 2025 – Sep 25, 2025 Network drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/zxdh: remove unnecessary null free check

Found with coccinell null free script.

---
 drivers/net/zxdh/zxdh_np.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/zxdh/zxdh_np.c +1 -2
index 21c749c67a..98b95532cd 100644
@@ -12330,8 +12330,7 @@ zxdh_np_dtb_acl_data_clear(uint32_t dev_id, uint32_t queue_id,
 				&element_id);
 	free(data_buff);
 	free(mask_buff);
-	if (eram_buff)
-		free(eram_buff);
+	free(eram_buff);
 
 	free(p_entry_arr);
 	ZXDH_COMM_CHECK_DEV_RC(dev_id, rc, "zxdh_np_dtb_acl_dma_insert");
Signature · 1 line
2.47.3