All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/1] mpt3sas: Fix - Remove cpumask_clear for zalloc_cpumask_var and dont free free_cpu_mask_var before reply_q
@ 2016-02-11  9:32 Suganath prabu Subramani
  2016-02-11 15:00 ` Martin K. Petersen
  0 siblings, 1 reply; 2+ messages in thread
From: Suganath prabu Subramani @ 2016-02-11  9:32 UTC (permalink / raw)
  To: JBottomley, jejb, hch
  Cc: martin.petersen, linux-scsi, Sathya.Prakash, kashyap.desai,
	krishnaraddi.mankani, linux-kernel, suganath-prabu.subramani,
	chaitra.basappa, sreekanth.reddy

From: Suganath prabu Subramani <suganath-prabu.subramani@broadcom.com>

Removed cpumask_clear as it is not required for zalloc_cpumask_var and
free free_cpumask_var before freeing reply_q.

Signed-off-by: Suganath prabu Subramani <suganath-prabu.subramani@broadcom.com>
Signed-off-by: Chaitra P B <chaitra.basappa@broadcom.com>
---
 drivers/scsi/mpt3sas/mpt3sas_base.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/scsi/mpt3sas/mpt3sas_base.c b/drivers/scsi/mpt3sas/mpt3sas_base.c
index c0a9d97..afdb13a 100644
--- a/drivers/scsi/mpt3sas/mpt3sas_base.c
+++ b/drivers/scsi/mpt3sas/mpt3sas_base.c
@@ -1855,7 +1855,6 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index, u32 vector)
 			kfree(reply_q);
 			return -ENOMEM;
 		}
-		cpumask_clear(reply_q->affinity_hint);
 	}
 
 	atomic_set(&reply_q->busy, 0);
@@ -1870,8 +1869,8 @@ _base_request_irq(struct MPT3SAS_ADAPTER *ioc, u8 index, u32 vector)
 	if (r) {
 		pr_err(MPT3SAS_FMT "unable to allocate interrupt %d!\n",
 		    reply_q->name, vector);
-		kfree(reply_q);
 		free_cpumask_var(reply_q->affinity_hint);
+		kfree(reply_q);
 		return -EBUSY;
 	}
 
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 1/1] mpt3sas: Fix - Remove cpumask_clear for zalloc_cpumask_var and dont free free_cpu_mask_var before reply_q
  2016-02-11  9:32 [PATCH 1/1] mpt3sas: Fix - Remove cpumask_clear for zalloc_cpumask_var and dont free free_cpu_mask_var before reply_q Suganath prabu Subramani
@ 2016-02-11 15:00 ` Martin K. Petersen
  0 siblings, 0 replies; 2+ messages in thread
From: Martin K. Petersen @ 2016-02-11 15:00 UTC (permalink / raw)
  To: Suganath prabu Subramani
  Cc: JBottomley, jejb, hch, martin.petersen, linux-scsi,
	Sathya.Prakash, kashyap.desai, krishnaraddi.mankani,
	linux-kernel, chaitra.basappa, sreekanth.reddy, Julia Lawall

>>>>> "Suganath" == Suganath prabu Subramani <suganath-prabu.subramani@broadcom.com> writes:

Suganath> Removed cpumask_clear as it is not required for
Suganath> zalloc_cpumask_var and free free_cpumask_var before freeing
Suganath> reply_q.

Applied to 4.6/scsi-queue.

However, next time please submit two patches, one for each issue.

-- 
Martin K. Petersen	Oracle Linux Engineering

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-11 15:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-11  9:32 [PATCH 1/1] mpt3sas: Fix - Remove cpumask_clear for zalloc_cpumask_var and dont free free_cpu_mask_var before reply_q Suganath prabu Subramani
2016-02-11 15:00 ` Martin K. Petersen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.