Commit:     856c52a741950dc0be2c5c231efec626e9a0a3fa
Parent:     f72d2f081453d8b1ea36e47478c3463042746ddc
Author:     Dotan Barak <[EMAIL PROTECTED]>
AuthorDate: Tue Jul 10 16:55:57 2007 +0300
Committer:  Roland Dreier <[EMAIL PROTECTED]>
CommitDate: Tue Jul 10 11:04:40 2007 -0700

    IB/core: Take sizeof the correct pointer when calling kmalloc()
    When allocating out_mad in show_pma_counter(), take sizeof *out_mad
    instead of sizeof *in_mad.  It is true that today the type of in_mad
    and out_mad are the same, but this patch will give us a cleaner code.
    Signed-off-by: Dotan Barak <[EMAIL PROTECTED]>
    Signed-off-by: Roland Dreier <[EMAIL PROTECTED]>
 drivers/infiniband/core/sysfs.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/infiniband/core/sysfs.c b/drivers/infiniband/core/sysfs.c
index 08c299e..6265a3f 100644
--- a/drivers/infiniband/core/sysfs.c
+++ b/drivers/infiniband/core/sysfs.c
@@ -311,7 +311,7 @@ static ssize_t show_pma_counter(struct ib_port *p, struct 
port_attribute *attr,
                return sprintf(buf, "N/A (no PMA)\n");
        in_mad  = kzalloc(sizeof *in_mad, GFP_KERNEL);
-       out_mad = kmalloc(sizeof *in_mad, GFP_KERNEL);
+       out_mad = kmalloc(sizeof *out_mad, GFP_KERNEL);
        if (!in_mad || !out_mad) {
                ret = -ENOMEM;
                goto out;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to