Commit 3687994a authored by Himanshu Jha's avatar Himanshu Jha Committed by Greg Kroah-Hartman

staging: r8822be: remove unnecessary call to memset

call to memset to assign 0 value immediately after allocating
memory with kzalloc is unnecesaary as kzalloc allocates the memory
filled with 0 value.

Build and tested it.
Signed-off-by: default avatarHimanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b9d7adc4
......@@ -5308,7 +5308,6 @@ halmac_write_cam_88xx(struct halmac_adapter *halmac_adapter, u32 entry_index,
cam_entry_format = kzalloc(sizeof(*cam_entry_format), GFP_KERNEL);
if (!cam_entry_format)
return HALMAC_RET_NULL_POINTER;
memset(cam_entry_format, 0x00, sizeof(*cam_entry_format));
cam_entry_format->key_id = cam_entry_info->key_id;
cam_entry_format->valid = cam_entry_info->valid;
......@@ -5461,7 +5460,6 @@ halmac_clear_cam_entry_88xx(struct halmac_adapter *halmac_adapter,
cam_entry_format = kzalloc(sizeof(*cam_entry_format), GFP_KERNEL);
if (!cam_entry_format)
return HALMAC_RET_NULL_POINTER;
memset(cam_entry_format, 0x00, sizeof(*cam_entry_format));
for (i = 0; i < 8; i++) {
HALMAC_REG_WRITE_32(halmac_adapter, REG_CAMWRITE,
......
......@@ -691,7 +691,6 @@ halmac_func_pg_efuse_by_map_88xx(struct halmac_adapter *halmac_adapter,
/* out of memory */
return HALMAC_RET_MALLOC_FAIL;
}
memset(eeprom_mask_updated, 0x00, eeprom_mask_size);
status = halmac_update_eeprom_mask_88xx(halmac_adapter, pg_efuse_info,
eeprom_mask_updated);
......@@ -3604,10 +3603,6 @@ halmac_verify_send_rsvd_page_88xx(struct halmac_adapter *halmac_adapter)
return HALMAC_RET_MALLOC_FAIL;
}
memset(rsvd_page, 0x00,
h2c_pkt_verify_size +
halmac_adapter->hw_config_info.txdesc_size);
ret_status = halmac_dump_fifo_88xx(
halmac_adapter, HAL_FIFO_SEL_RSVD_PAGE, 0,
h2c_pkt_verify_size +
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment