lkml.org 
[lkml]   [2018]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] scsi: qla4xxx: NULL check before some freeing functions is not needed.
Date

> -----Original Message-----
> From: Thomas Meyer <thomas@m3y3r.de>
> Sent: Monday, December 3, 2018 2:22 AM
> To: Dept-Eng QLogic Storage Upstream <QLogic-Storage-
> Upstream@cavium.com>; jejb@linux.vnet.ibm.com;
> martin.petersen@oracle.com; linux-scsi@vger.kernel.org; linux-
> kernel@vger.kernel.org
> Subject: [PATCH] scsi: qla4xxx: NULL check before some freeing functions is not
> needed.
>
> External Email
>
> NULL check before some freeing functions is not needed.
>
> Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
> ---
>
> diff -u -p a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
> --- a/drivers/scsi/qla4xxx/ql4_os.c
> +++ b/drivers/scsi/qla4xxx/ql4_os.c
> @@ -4160,20 +4160,17 @@ static void qla4xxx_mem_free(struct scsi
> ha->fw_dump_size = 0;
>
> /* Free srb pool. */
> - if (ha->srb_mempool)
> - mempool_destroy(ha->srb_mempool);
> + mempool_destroy(ha->srb_mempool);
>
> ha->srb_mempool = NULL;
>
> - if (ha->chap_dma_pool)
> - dma_pool_destroy(ha->chap_dma_pool);
> + dma_pool_destroy(ha->chap_dma_pool);
>
> if (ha->chap_list)
> vfree(ha->chap_list);
> ha->chap_list = NULL;
>
> - if (ha->fw_ddb_dma_pool)
> - dma_pool_destroy(ha->fw_ddb_dma_pool);
> + dma_pool_destroy(ha->fw_ddb_dma_pool);
>
> /* release io space registers */
> if (is_qla8022(ha)) {

Thanks
Acked-by: Manish Rangankar <Manish.Rangankar@cavium.com>
\
 
 \ /
  Last update: 2018-12-03 06:48    [W:0.257 / U:1.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site