From: Andrew Morton <akpm@osdl.org>
To: ambx1@neo.rr.com (Adam Belay)
Cc: castet.matthieu@free.fr, linux-kernel@vger.kernel.org, vojtech@suse.cz
Subject: Re: [patch] ns558 bug
Date: Fri, 4 Feb 2005 19:06:14 -0800 [thread overview]
Message-ID: <20050204190614.6cfd68ce.akpm@osdl.org> (raw)
In-Reply-To: <20050205004311.GA7998@neo.rr.com>
ambx1@neo.rr.com (Adam Belay) wrote:
>
> On Fri, Feb 04, 2005 at 09:00:54PM +0100, matthieu castet wrote:
> > Hi,
> >
> > this patch is based on http://bugzilla.kernel.org/show_bug.cgi?id=2962
> > patch from adam belay.
> >
> > It solve a oops when pnp_register_driver(&ns558_pnp_driver) failed.
> >
> > Please apply this patch.
> >
> > Matthieu
>
> I remember writing a version of this patch a while ago. The current behavior
> is broken because it shouldn't be considered a failure if the driver doesn't
> find any devices.
So would this be the appropriate fix?
--- 25/drivers/input/gameport/ns558.c~ns558-oops-fix 2005-02-04 19:03:11.065813120 -0800
+++ 25-akpm/drivers/input/gameport/ns558.c 2005-02-04 19:05:52.607255088 -0800
@@ -264,6 +264,7 @@ static struct pnp_driver ns558_pnp_drive
static int __init ns558_init(void)
{
int i = 0;
+ int ret;
/*
* Probe for ISA ports.
@@ -272,8 +273,8 @@ static int __init ns558_init(void)
while (ns558_isa_portlist[i])
ns558_isa_probe(ns558_isa_portlist[i++]);
- pnp_register_driver(&ns558_pnp_driver);
- return list_empty(&ns558_list) ? -ENODEV : 0;
+ ret = pnp_register_driver(&ns558_pnp_driver);
+ return (ret < 0) ? ret : 0;
}
static void __exit ns558_exit(void)
_
next prev parent reply other threads:[~2005-02-05 3:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-04 20:00 matthieu castet
2005-02-05 0:43 ` Adam Belay
2005-02-05 3:06 ` Andrew Morton [this message]
2005-02-05 3:08 ` Adam Belay
2005-02-05 3:21 ` Andrew Morton
2005-02-05 3:48 ` Adam Belay
2005-02-05 4:01 ` Andrew Morton
2005-02-05 8:31 ` matthieu castet
2005-02-07 9:53 ` Vojtech Pavlik
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=20050204190614.6cfd68ce.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=ambx1@neo.rr.com \
--cc=castet.matthieu@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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
Powered by JetHome