]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ppc32: Fix ocp_register_driver() return value
authorAndrew Morton <akpm@osdl.org>
Tue, 18 May 2004 15:00:40 +0000 (08:00 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Tue, 18 May 2004 15:00:40 +0000 (08:00 -0700)
From: Matt Porter <mporter@kernel.crashing.org>

Fixes return value from ocp_register_driver().

arch/ppc/syslib/ocp.c

index 6d7b4281c3c2210e1f2d39a359687b342314428d..0421450c38cf9c4487fc7981fef86fbd9d6dcd07 100644 (file)
@@ -203,10 +203,6 @@ struct bus_type ocp_bus_type = {
  *     NOTE: Detection of devices is a 2 pass step on this implementation,
  *     hotswap isn't supported. First, all OCP devices are put in the device
  *     list, _then_ all drivers are probed on each match.
- *
- *     This function returns a count of how many devices actually matched
- *     (whether the probe routine returned 0 or -ENODEV, a different error
- *     code isn't considered as a match).
  */
 int
 ocp_register_driver(struct ocp_driver *drv)
@@ -220,9 +216,7 @@ ocp_register_driver(struct ocp_driver *drv)
        drv->driver.remove = ocp_device_remove;
 
        /* register with core */
-       count = driver_register(&drv->driver);
-
-       return count ? count : 1;
+       return driver_register(&drv->driver);
 }
 
 /**