Home Home > GIT Browse > SLE12-SP4-AZURE
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2019-06-06 10:40:58 +0200
committerHannes Reinecke <hare@suse.de>2019-06-06 10:41:11 +0200
commitc0027abab39e8195cdd747963695aa6cfb88b0c3 (patch)
tree5775748a1767774fb2c5f7c74624ddab7c4e1d04
parentcbfbea0dbc015c089a26971d1549d56a25f3c19e (diff)
scsi: qla2xxx: NULL check before some freeing functions is
not needed (bsc#1137444).
-rw-r--r--patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch88
-rw-r--r--series.conf1
2 files changed, 89 insertions, 0 deletions
diff --git a/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch b/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
new file mode 100644
index 0000000000..9faa6b6b1b
--- /dev/null
+++ b/patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
@@ -0,0 +1,88 @@
+From: Thomas Meyer <thomas@m3y3r.de>
+Date: Sun, 2 Dec 2018 21:52:11 +0100
+Subject: [PATCH] scsi: qla2xxx: NULL check before some freeing functions is
+ not needed
+Git-commit: 75c1d48a338bdf3ce850166be527598017e0ebca
+Patch-mainline: v5.0-rc1
+References: bsc#1137444
+
+NULL check before some freeing functions is not needed.
+
+Signed-off-by: Thomas Meyer <thomas@m3y3r.de>
+Acked-by: Himanshu Madhani <hmadhani@marvell.com>
+Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
+Acked-by: Hannes Reinecke <hare@suse.com>
+---
+ drivers/scsi/qla2xxx/qla_os.c | 24 ++++++++----------------
+ 1 file changed, 8 insertions(+), 16 deletions(-)
+
+diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c
+index 4a75e0572121..643cd7c0efc1 100644
+--- a/drivers/scsi/qla2xxx/qla_os.c
++++ b/drivers/scsi/qla2xxx/qla_os.c
+@@ -4183,12 +4183,10 @@ qla2x00_mem_alloc(struct qla_hw_data *ha, uint16_t req_len, uint16_t rsp_len,
+ kfree(ha->nvram);
+ ha->nvram = NULL;
+ fail_free_ctx_mempool:
+- if (ha->ctx_mempool)
+- mempool_destroy(ha->ctx_mempool);
++ mempool_destroy(ha->ctx_mempool);
+ ha->ctx_mempool = NULL;
+ fail_free_srb_mempool:
+- if (ha->srb_mempool)
+- mempool_destroy(ha->srb_mempool);
++ mempool_destroy(ha->srb_mempool);
+ ha->srb_mempool = NULL;
+ fail_free_gid_list:
+ dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
+@@ -4490,8 +4488,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ dma_free_coherent(&ha->pdev->dev, MCTP_DUMP_SIZE, ha->mctp_dump,
+ ha->mctp_dump_dma);
+
+- if (ha->srb_mempool)
+- mempool_destroy(ha->srb_mempool);
++ mempool_destroy(ha->srb_mempool);
+
+ if (ha->dcbx_tlv)
+ dma_free_coherent(&ha->pdev->dev, DCBX_TLV_DATA_SIZE,
+@@ -4523,8 +4520,7 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ if (ha->async_pd)
+ dma_pool_free(ha->s_dma_pool, ha->async_pd, ha->async_pd_dma);
+
+- if (ha->s_dma_pool)
+- dma_pool_destroy(ha->s_dma_pool);
++ dma_pool_destroy(ha->s_dma_pool);
+
+ if (ha->gid_list)
+ dma_free_coherent(&ha->pdev->dev, qla2x00_gid_list_size(ha),
+@@ -4545,14 +4541,11 @@ qla2x00_mem_free(struct qla_hw_data *ha)
+ }
+ }
+
+- if (ha->dl_dma_pool)
+- dma_pool_destroy(ha->dl_dma_pool);
++ dma_pool_destroy(ha->dl_dma_pool);
+
+- if (ha->fcp_cmnd_dma_pool)
+- dma_pool_destroy(ha->fcp_cmnd_dma_pool);
++ dma_pool_destroy(ha->fcp_cmnd_dma_pool);
+
+- if (ha->ctx_mempool)
+- mempool_destroy(ha->ctx_mempool);
++ mempool_destroy(ha->ctx_mempool);
+
+ qlt_mem_free(ha);
+
+@@ -7098,8 +7091,7 @@ qla2x00_module_exit(void)
+ qla2x00_release_firmware();
+ kmem_cache_destroy(srb_cachep);
+ qlt_exit();
+- if (ctx_cachep)
+- kmem_cache_destroy(ctx_cachep);
++ kmem_cache_destroy(ctx_cachep);
+ fc_release_transport(qla2xxx_transport_template);
+ fc_release_transport(qla2xxx_transport_vport_template);
+ }
+--
+2.16.4
+
diff --git a/series.conf b/series.conf
index 83f3b3cd70..6b990f90cb 100644
--- a/series.conf
+++ b/series.conf
@@ -20675,6 +20675,7 @@
patches.drivers/scsi-qla2xxx-Introduce-a-switch-case-statement-in-ql.patch
patches.drivers/scsi-csiostor-remove-flush_scheduled_work
patches.drivers/scsi-qla2xxx-Split-the-__qla2x00_abort_all_cmds-func.patch
+ patches.drivers/scsi-qla2xxx-NULL-check-before-some-freeing-function.patch
patches.arch/s390-scsi-zfcp-fix-posting-too-many-status-read-buffers.patch
patches.drivers/scsi-lpfc-Fix-panic-when-FW-log-buffsize-is-not-init.patch
patches.drivers/scsi-lpfc-update-manufacturer-attribute-to-reflect-B.patch