net/zxdh: remove unnecessary null free checks
PATCH 1/1 net/zxdh: remove unnecessary null free checks
Remove unnecessary checks for null pointer.
Found by devtools/cocci/nullfree.cocci script.
Signed-off-by Stephen Hemminger <[email protected]>
--- drivers/net/zxdh/zxdh_ethdev.c | 3 +-- drivers/net/zxdh/zxdh_np.c | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-)
drivers/net/zxdh/zxdh_ethdev.c +1 -2
@@ -945,8 +945,7 @@ zxdh_np_dtb_data_res_free(struct zxdh_hw *hw)if (ret)PMD_DRV_LOG (ERR ,"%s dpp_np_online_uninstall failed" , dev->data->name); -if (g_dtb_data.dtb_table_conf_mz) -rte_memzone_free (g_dtb_data.dtb_table_conf_mz); +rte_memzone_free (g_dtb_data.dtb_table_conf_mz);if (g_dtb_data.dtb_table_dump_mz) {rte_memzone_free (g_dtb_data.dtb_table_dump_mz);
drivers/net/zxdh/zxdh_np.c +1 -2
@@ -873,8 +873,7 @@ zxdh_np_sdt_mgr_destroy(uint32_t dev_id) p_sdt_tbl_temp =ZXDH_SDT_SOFT_TBL_GET (dev_id); p_sdt_mgr =ZXDH_SDT_MGR_PTR_GET (); -if (p_sdt_tbl_temp !=NULL ) -free (p_sdt_tbl_temp); +free (p_sdt_tbl_temp);ZXDH_SDT_SOFT_TBL_GET (dev_id) =NULL ;
Signature · 1 line
2.47.2