All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH][Resend] SCSI: pmcraid: Fix swapped kmalloc() arguments
@ 2011-08-01 21:45 Jesper Juhl
  0 siblings, 0 replies; only message in thread
From: Jesper Juhl @ 2011-08-01 21:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-scsi, Anil Ravindranath, James E.J. Bottomley

pmcraid_chr_ioctl() contains a kmalloc() call where the arguments are
switched, fix that.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
---
 drivers/scsi/pmcraid.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index b86db84..559440b 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4102,8 +4102,7 @@ static long pmcraid_chr_ioctl(
 	struct pmcraid_ioctl_header *hdr = NULL;
 	int retval = -ENOTTY;
 
-	hdr = kmalloc(GFP_KERNEL, sizeof(struct pmcraid_ioctl_header));
-
+	hdr = kmalloc(sizeof(struct pmcraid_ioctl_header), GFP_KERNEL);
 	if (!hdr) {
 		pmcraid_err("faile to allocate memory for ioctl header\n");
 		return -ENOMEM;
-- 
1.7.6


-- 
Jesper Juhl <jj@chaosbits.net>       http://www.chaosbits.net/
Don't top-post http://www.catb.org/jargon/html/T/top-post.html
Plain text mails only, please.


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-08-01 21:45 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-01 21:45 [PATCH][Resend] SCSI: pmcraid: Fix swapped kmalloc() arguments Jesper Juhl

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.