From: Cornelia Huck <cornelia.huck@de.ibm.com>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: [Patch] [mm] Fix bus_rescan_devices() in -mm
Date: Thu, 20 Jul 2006 16:59:11 +0200 [thread overview]
Message-ID: <20060720165911.42603374@gondolin.boeblingen.de.ibm.com> (raw)
With the __must_check changes in the driver core,
bus_rescan_devices_helper() now returns the return code of its call to
device_attach(). device_attach() will return < 0 on error, 0 on no
match and 1 on match. This means that bus_rescan_devices() will stop
after the first successful match for a device, which is probably not
what we want. Stopping on error makes sense, however.
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
bus.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff -Naurp linux-2.6.18-rc1-mm2/drivers/base/bus.c linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c
--- linux-2.6.18-rc1-mm2/drivers/base/bus.c 2006-07-17 18:15:37.000000000 +0200
+++ linux-2.6.18-rc1-mm2+CH/drivers/base/bus.c 2006-07-17 18:17:51.000000000 +0200
@@ -572,7 +572,7 @@ static int __must_check bus_rescan_devic
if (dev->parent)
up(&dev->parent->sem);
}
- return ret;
+ return ret < 0 ? ret : 0;
}
/**
next reply other threads:[~2006-07-20 14:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-20 14:59 Cornelia Huck [this message]
2006-07-21 13:20 ` [Patch] [mm] More driver core fixes for -mm Cornelia Huck
2006-07-24 17:00 ` [Patch] [mm] Yet further " Cornelia Huck
2006-07-25 8:08 ` [Patch] [mm] More " Andrew Morton
2006-07-25 8:46 ` Cornelia Huck
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=20060720165911.42603374@gondolin.boeblingen.de.ibm.com \
--to=cornelia.huck@de.ibm.com \
--cc=akpm@osdl.org \
--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
all inboxes | Powered by JetHome®