All of lore.kernel.org
 help / color / mirror / Atom feed
* pmcraid_chr_ioctl uses incorrect argument order to kmalloc()
@ 2011-10-24 22:10 Dave Jones
  0 siblings, 0 replies; only message in thread
From: Dave Jones @ 2011-10-24 22:10 UTC (permalink / raw)
  To: anil_ravindranath; +Cc: Linux Kernel, linux-scsi

Size is 1st arg, not second.

Signed-off-by: Dave Jones <davej@redhat.com>

diff --git a/drivers/scsi/pmcraid.c b/drivers/scsi/pmcraid.c
index d079f9a..da19bdf 100644
--- a/drivers/scsi/pmcraid.c
+++ b/drivers/scsi/pmcraid.c
@@ -4103,7 +4103,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");

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

only message in thread, other threads:[~2011-10-24 22:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-24 22:10 pmcraid_chr_ioctl uses incorrect argument order to kmalloc() Dave Jones

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.