From: David Dillow <dave@thedillows.org>
To: David Miller <davem@davemloft.net>
Cc: ben@decadent.org.uk, netdev@vger.kernel.org
Subject: Re: [PATCH v2] typhoon: Use request_firmware()
Date: Mon, 02 Mar 2009 02:56:19 -0500 [thread overview]
Message-ID: <1235980579.23967.2.camel@localhost.localdomain> (raw)
In-Reply-To: <20090301.202929.81587113.davem@davemloft.net>
On Sun, 2009-03-01 at 20:29 -0800, David Miller wrote:
> I cared enough to fix this, maybe one of you will care enough
> to test it.
Like I said, I will be happy to test as soon as I can dig the hardware
out. In any event, this is broken.
> static int
> typhoon_request_firmware(struct typhoon *tp)
> @@ -1367,12 +1368,22 @@ typhoon_request_firmware(struct typhoon *tp)
> memcmp(typhoon_fw->data, "TYPHOON", 8)) {
> printk(KERN_ERR "%s: Invalid firmware image\n",
> tp->name);
> - release_firmware(typhoon_fw);
> - typhoon_fw = NULL;
> - return -EINVAL;
> + err = -EINVAL;
> + goto out_err;
> + }
> +
> + 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.
next prev parent reply other threads:[~2009-03-02 7:56 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1235324217.2832.49.camel@hashbaz.i.decadent.org.uk>
2009-02-26 13:49 ` [PATCH v2] typhoon: Use request_firmware() Ben Hutchings
2009-02-27 7:21 ` David Miller
2009-03-01 20:38 ` David Dillow
2009-03-02 1:02 ` Ben Hutchings
2009-03-02 1:44 ` David Miller
2009-03-02 3:16 ` David Dillow
2009-03-02 4:11 ` David Miller
2009-03-02 4:29 ` David Miller
2009-03-02 7:56 ` David Dillow [this message]
2009-03-02 9:53 ` David Miller
2009-03-03 5:44 ` David Dillow
2009-03-03 5:49 ` [PATCH v3 checked] " David Dillow
2009-03-03 6:15 ` David Miller
[not found] ` <1235622381.8683.38.camel@hashbaz.i.decadent.org.uk>
2009-02-27 7:21 ` [PATCH v2] " David Miller
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=1235980579.23967.2.camel@localhost.localdomain \
--to=dave@thedillows.org \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=netdev@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox