linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Patch] [mm] Fix bus_rescan_devices() in -mm
@ 2006-07-20 14:59 Cornelia Huck
  2006-07-21 13:20 ` [Patch] [mm] More driver core fixes for -mm Cornelia Huck
  0 siblings, 1 reply; 5+ messages in thread
From: Cornelia Huck @ 2006-07-20 14:59 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-kernel


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;
 }
 
 /**

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-07-25  8:46 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-20 14:59 [Patch] [mm] Fix bus_rescan_devices() in -mm Cornelia Huck
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).