@@ -3834,7 +3834,7 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3834
3834
int size ;
3835
3835
3836
3836
size = nic -> num_entries * sizeof (struct msix_entry );
3837
- nic -> entries = kmalloc (size , GFP_KERNEL );
3837
+ nic -> entries = kzalloc (size , GFP_KERNEL );
3838
3838
if (!nic -> entries ) {
3839
3839
DBG_PRINT (INFO_DBG , "%s: Memory allocation failed\n" , \
3840
3840
__func__ );
@@ -3843,10 +3843,8 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3843
3843
}
3844
3844
nic -> mac_control .stats_info -> sw_stat .mem_allocated += size ;
3845
3845
3846
- memset (nic -> entries , 0 , size );
3847
-
3848
3846
size = nic -> num_entries * sizeof (struct s2io_msix_entry );
3849
- nic -> s2io_entries = kmalloc (size , GFP_KERNEL );
3847
+ nic -> s2io_entries = kzalloc (size , GFP_KERNEL );
3850
3848
if (!nic -> s2io_entries ) {
3851
3849
DBG_PRINT (INFO_DBG , "%s: Memory allocation failed\n" ,
3852
3850
__func__ );
@@ -3857,7 +3855,6 @@ static int s2io_enable_msi_x(struct s2io_nic *nic)
3857
3855
return - ENOMEM ;
3858
3856
}
3859
3857
nic -> mac_control .stats_info -> sw_stat .mem_allocated += size ;
3860
- memset (nic -> s2io_entries , 0 , size );
3861
3858
3862
3859
nic -> entries [0 ].entry = 0 ;
3863
3860
nic -> s2io_entries [0 ].entry = 0 ;
0 commit comments