diff options
author | Himanshu Jha <himanshujha199640@gmail.com> | 2017-08-27 18:53:56 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-08-27 19:59:10 +0200 |
commit | 3687994a032115e6e4f89c5715304f5361d13cfb (patch) | |
tree | 58c9296fd4e7b6a5613862491e75f816c5b702b9 | |
parent | b9d7adc45d8837040a9f2cea584b4e0ef25ca271 (diff) |
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: Himanshu Jha <himanshujha199640@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c | 2 | ||||
-rw-r--r-- | drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c | 5 |
2 files changed, 0 insertions, 7 deletions
diff --git a/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c b/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c index ee7c3d0a6e34..0551c471ac43 100644 --- a/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c +++ b/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c @@ -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, diff --git a/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c b/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c index 50f6f256795a..f33024e4d853 100644 --- a/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c +++ b/drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_func_88xx.c @@ -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 + |