[PATCH] SCSI, pmcraid: Fix kmalloc() argument order inpmcraid_chr_ioctl()

From: Jesper Juhl
Date: Mon Oct 24 2011 - 18:34:01 EST

The first argument to kmalloc() is the size, the second is
flags. pmcraid_chr_ioctl() gets this wrong and swaps the
arguments. This patch corrects the mistake.

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

compile tested only.

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");

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

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/