Merge tag 'sh-for-4.17' of git://git.libc.org/linux-sh
[linux-2.6-microblaze.git] / drivers / scsi / qla4xxx / ql4_os.c
index fc2c97d..94c14ce 100644 (file)
@@ -843,12 +843,10 @@ static int qla4xxx_delete_chap(struct Scsi_Host *shost, uint16_t chap_tbl_idx)
        uint32_t chap_size;
        int ret = 0;
 
-       chap_table = dma_pool_alloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma);
+       chap_table = dma_pool_zalloc(ha->chap_dma_pool, GFP_KERNEL, &chap_dma);
        if (chap_table == NULL)
                return -ENOMEM;
 
-       memset(chap_table, 0, sizeof(struct ql4_chap_table));
-
        if (is_qla80XX(ha))
                max_chap_entries = (ha->hw.flt_chap_size / 2) /
                                   sizeof(struct ql4_chap_table);