From: Dmitry Torokhov <dtor@insightbb.com>
To: Jiri Kosina <jikos@jikos.cz>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel@vger.kernel.org,
linux-input@atrey.karlin.mff.cuni.cz
Subject: Re: [PATCH] fix fm801_gp_probe() ignoring return value from pci_enable_device()
Date: Thu, 12 Oct 2006 22:36:47 -0400 [thread overview]
Message-ID: <200610122236.49321.dtor@insightbb.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0610130123270.29022@twin.jikos.cz>
On Thursday 12 October 2006 19:27, Jiri Kosina wrote:
> [PATCH] fix fm801_gp_probe() ignoring return value from pci_enable_device()
>
> Fix fm801_gp_probe() not handling pci_enable_device() return value
> correctly.
>
> Signed-off-by: Jiri Kosina <jikos@jikos.cz>
>
> ---
>
> drivers/input/gameport/fm801-gp.c | 23 ++++++++++++++++-------
> 1 files changed, 16 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/input/gameport/fm801-gp.c b/drivers/input/gameport/fm801-gp.c
> index 90de5af..5ac9e15 100644
> --- a/drivers/input/gameport/fm801-gp.c
> +++ b/drivers/input/gameport/fm801-gp.c
> @@ -82,17 +82,22 @@ static int __devinit fm801_gp_probe(stru
> {
> struct fm801_gp *gp;
> struct gameport *port;
> + int err;
>
> gp = kzalloc(sizeof(struct fm801_gp), GFP_KERNEL);
> port = gameport_allocate_port();
> if (!gp || !port) {
> printk(KERN_ERR "fm801-gp: Memory allocation failed\n");
> - kfree(gp);
> - gameport_free_port(port);
> - return -ENOMEM;
> + err = -ENOMEM;
> + goto out_err;
> }
>
Hi Jiri,
It looks like you left pci device enabled. Anyway, Jeff Garzik beat you
to it ;) I spplied his patch to my tree yesterday.
--
Dmitry
prev parent reply other threads:[~2006-10-13 2:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 23:27 [PATCH] fix fm801_gp_probe() ignoring return value from pci_enable_device() Jiri Kosina
2006-10-13 2:36 ` Dmitry Torokhov [this message]
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=200610122236.49321.dtor@insightbb.com \
--to=dtor@insightbb.com \
--cc=akpm@osdl.org \
--cc=jikos@jikos.cz \
--cc=linux-input@atrey.karlin.mff.cuni.cz \
--cc=linux-kernel@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