From: "Bjørn Mork" <bjorn@mork•no>
To: Oliver Neukum <oneukum@suse•com>
Cc: linux-usb@vger•kernel.org, netdev@vger•kernel.org,
davem@davemloft•net, stern@rowland•harvard.edu
Subject: Re: [PATCH 2/2] kaweth: fix oops upon failed memory allocation
Date: Wed, 17 Aug 2016 15:15:49 +0200 [thread overview]
Message-ID: <87ziobk03e.fsf@miraculix.mork.no> (raw)
In-Reply-To: <1471427969-2355-2-git-send-email-oneukum@suse.com> (Oliver Neukum's message of "Wed, 17 Aug 2016 11:59:29 +0200")
Oliver Neukum <oneukum@suse•com> writes:
> Just return an error upon failure.
>
> Signed-off-by: Oliver Neukum <oneukum@suse•com>
> ---
> drivers/net/usb/kaweth.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/usb/kaweth.c b/drivers/net/usb/kaweth.c
> index 37bf715..3cd6906 100644
> --- a/drivers/net/usb/kaweth.c
> +++ b/drivers/net/usb/kaweth.c
> @@ -1049,6 +1049,8 @@ static int kaweth_probe(
> /* Download the firmware */
> dev_info(dev, "Downloading firmware...\n");
> kaweth->firmware_buf = (__u8 *)__get_free_page(GFP_KERNEL);
> + if (!kaweth->firmware_buf)
> + return -ENOMEM;
Eh, that should be "goto err_free_netdev;", shouldn't it?
Bjørn
next prev parent reply other threads:[~2016-08-17 13:17 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-17 9:59 [PATCH 1/2] kaweth: fix firmware download Oliver Neukum
2016-08-17 9:59 ` [PATCH 2/2] kaweth: fix oops upon failed memory allocation Oliver Neukum
2016-08-17 13:15 ` Bjørn Mork [this message]
2016-08-17 13:33 ` Oliver Neukum
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=87ziobk03e.fsf@miraculix.mork.no \
--to=bjorn@mork$(echo .)no \
--cc=davem@davemloft$(echo .)net \
--cc=linux-usb@vger$(echo .)kernel.org \
--cc=netdev@vger$(echo .)kernel.org \
--cc=oneukum@suse$(echo .)com \
--cc=stern@rowland$(echo .)harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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