diff --git a/drivers/base/bus.c b/drivers/base/bus.c
index 49683a1d3898778eb0cab0489e70978f3aef34f2..207270822e3cdf5bc57012618680fa09f622c6d4 100644
--- a/drivers/base/bus.c
+++ b/drivers/base/bus.c
@@ -96,7 +96,7 @@ static void attach(struct device * dev)
 
 static int bus_match(struct device * dev, struct device_driver * drv)
 {
-	int error = 0;
+	int error = -ENODEV;
 	if (dev->bus->match(dev,drv)) {
 		dev->driver = drv;
 		if (drv->probe) {
@@ -104,7 +104,8 @@ static int bus_match(struct device * dev, struct device_driver * drv)
 				attach(dev);
 			else
 				dev->driver = NULL;
-		}
+		} else 
+			attach(dev);
 	}
 	return error;
 }