mirror of
https://github.com/torvalds/linux.git
synced 2024-11-10 22:21:40 +00:00
scsi: aic94xx: Use dma_pool_zalloc
Replaced dma_pool_alloc + memset with dma_pool_zalloc. Signed-off-by: Brajeswar Ghosh <brajeswar.linux@gmail.com> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
parent
399b6c8bc9
commit
0e55892ea2
@ -1057,14 +1057,13 @@ static struct asd_ascb *asd_ascb_alloc(struct asd_ha_struct *asd_ha,
|
||||
|
||||
if (ascb) {
|
||||
ascb->dma_scb.size = sizeof(struct scb);
|
||||
ascb->dma_scb.vaddr = dma_pool_alloc(asd_ha->scb_pool,
|
||||
ascb->dma_scb.vaddr = dma_pool_zalloc(asd_ha->scb_pool,
|
||||
gfp_flags,
|
||||
&ascb->dma_scb.dma_handle);
|
||||
if (!ascb->dma_scb.vaddr) {
|
||||
kmem_cache_free(asd_ascb_cache, ascb);
|
||||
return NULL;
|
||||
}
|
||||
memset(ascb->dma_scb.vaddr, 0, sizeof(struct scb));
|
||||
asd_init_ascb(asd_ha, ascb);
|
||||
|
||||
spin_lock_irqsave(&seq->tc_index_lock, flags);
|
||||
|
Loading…
Reference in New Issue
Block a user