@ -4112,16 +4112,14 @@ static int skd_cons_skcomp(struct skd_device *skdev)
skdev - > name , __func__ , __LINE__ ,
nbytes , SKD_N_COMPLETION_ENTRY ) ;
skcomp = pci_alloc_consistent ( skdev - > pdev , nbytes ,
& skdev - > cq_dma_address ) ;
skcomp = pci_z alloc_consistent ( skdev - > pdev , nbytes ,
& skdev - > cq_dma_address ) ;
if ( skcomp = = NULL ) {
rc = - ENOMEM ;
goto err_out ;
}
memset ( skcomp , 0 , nbytes ) ;
skdev - > skcomp_table = skcomp ;
skdev - > skerr_table = ( struct fit_comp_error_info * ) ( ( char * ) skcomp +
sizeof ( * skcomp ) *
@ -4304,15 +4302,14 @@ static int skd_cons_skspcl(struct skd_device *skdev)
nbytes = SKD_N_SPECIAL_FITMSG_BYTES ;
skspcl - > msg_buf = pci_alloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > mb_dma_address ) ;
skspcl - > msg_buf =
pci_zalloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > mb_dma_address ) ;
if ( skspcl - > msg_buf = = NULL ) {
rc = - ENOMEM ;
goto err_out ;
}
memset ( skspcl - > msg_buf , 0 , nbytes ) ;
skspcl - > req . sg = kzalloc ( sizeof ( struct scatterlist ) *
SKD_N_SG_PER_SPECIAL , GFP_KERNEL ) ;
if ( skspcl - > req . sg = = NULL ) {
@ -4353,25 +4350,21 @@ static int skd_cons_sksb(struct skd_device *skdev)
nbytes = SKD_N_INTERNAL_BYTES ;
skspcl - > data_buf = pci_alloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > db_dma_address ) ;
skspcl - > data_buf = pci_z alloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > db_dma_address ) ;
if ( skspcl - > data_buf = = NULL ) {
rc = - ENOMEM ;
goto err_out ;
}
memset ( skspcl - > data_buf , 0 , nbytes ) ;
nbytes = SKD_N_SPECIAL_FITMSG_BYTES ;
skspcl - > msg_buf = pci_alloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > mb_dma_address ) ;
skspcl - > msg_buf = pci_zalloc_consistent ( skdev - > pdev , nbytes ,
& skspcl - > mb_dma_address ) ;
if ( skspcl - > msg_buf = = NULL ) {
rc = - ENOMEM ;
goto err_out ;
}
memset ( skspcl - > msg_buf , 0 , nbytes ) ;
skspcl - > req . sksg_list = skd_cons_sg_list ( skdev , 1 ,
& skspcl - > req . sksg_dma_address ) ;
if ( skspcl - > req . sksg_list = = NULL ) {