All of lore.kernel.org
 help / color / mirror / Atom feed
From: malahal@us.ibm.com
To: linux-scsi@vger.kernel.org
Subject: [PATCH] aic94xx: Fix incorrect memory allocation size
Date: Thu, 7 Sep 2006 11:39:36 -0700	[thread overview]
Message-ID: <20060907183936.GA3713@us.ibm.com> (raw)

This patch corrects the size passed to kmalloc in asd_register_sas_ha()

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>


diff -r 134012c83658 drivers/scsi/aic94xx/aic94xx_init.c
--- a/drivers/scsi/aic94xx/aic94xx_init.c	Thu Aug 31 13:03:38 2006 -0700
+++ b/drivers/scsi/aic94xx/aic94xx_init.c	Wed Sep 06 23:40:29 2006 -0700
@@ -481,9 +481,9 @@ static int asd_register_sas_ha(struct as
 {
 	int i;
 	struct asd_sas_phy   **sas_phys =
-		kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_phy), GFP_KERNEL);
+		kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_phy *), GFP_KERNEL);
 	struct asd_sas_port  **sas_ports =
-		kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_port), GFP_KERNEL);
+		kmalloc(ASD_MAX_PHYS * sizeof(struct asd_sas_port *), GFP_KERNEL);
 
 	if (!sas_phys || !sas_ports) {
 		kfree(sas_phys);

             reply	other threads:[~2006-09-07 18:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-07 18:39 malahal [this message]
2006-09-07 19:38 ` [PATCH] aic94xx: Fix incorrect memory allocation size James Bottomley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060907183936.GA3713@us.ibm.com \
    --to=malahal@us.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.