[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090302.015315.181629191.davem@davemloft.net>
Date: Mon, 02 Mar 2009 01:53:15 -0800 (PST)
From: David Miller <davem@...emloft.net>
To: dave@...dillows.org
Cc: ben@...adent.org.uk, netdev@...r.kernel.org
Subject: Re: [PATCH v2] typhoon: Use request_firmware()
From: David Dillow <dave@...dillows.org>
Date: Mon, 02 Mar 2009 02:56:19 -0500
> On Sun, 2009-03-01 at 20:29 -0800, David Miller wrote:
> > +
> > + typhoon_fw_image = kmalloc(typhoon_fw->size, GFP_KERNEL);
> > + if (!typhoon_fw_image) {
> > + err = -ENOMEM;
> > + goto out_err;
> > }
>
> You never copied the image into the kmalloc'd memory, so you upload
> garbage.
>
> Fix that and I think it will be OK.
Good catch, I've checked in the following fix:
typhoon: Add missing firmware copy.
Noticed by David Dillow.
Signed-off-by: David S. Miller <davem@...emloft.net>
---
drivers/net/typhoon.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c
index ec2541c..9bba787 100644
--- a/drivers/net/typhoon.c
+++ b/drivers/net/typhoon.c
@@ -1377,6 +1377,7 @@ typhoon_request_firmware(struct typhoon *tp)
err = -ENOMEM;
goto out_err;
}
+ memcpy(typhoon_fw_image, typhoon_fw->data, typhoon_fw->size);
return 0;
--
1.6.1.2.253.ga34a
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists