[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20111024221025.GA22337@redhat.com>
Date: Mon, 24 Oct 2011 18:10:26 -0400
From: Dave Jones <davej@...hat.com>
To: anil_ravindranath@...-sierra.com
Cc: Linux Kernel <linux-kernel@...r.kernel.org>,
linux-scsi@...r.kernel.org
Subject: pmcraid_chr_ioctl uses incorrect argument order to kmalloc()
Size is 1st arg, not second.
Signed-off-by: Dave Jones <davej@...hat.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");
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists