Commit f665e63f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ppc32: Fix ocp_register_driver() return value

From: Matt Porter <mporter@kernel.crashing.org>

Fixes return value from ocp_register_driver().
parent 281ce5aa
...@@ -203,10 +203,6 @@ struct bus_type ocp_bus_type = { ...@@ -203,10 +203,6 @@ struct bus_type ocp_bus_type = {
* NOTE: Detection of devices is a 2 pass step on this implementation, * 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 * hotswap isn't supported. First, all OCP devices are put in the device
* list, _then_ all drivers are probed on each match. * 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 int
ocp_register_driver(struct ocp_driver *drv) ocp_register_driver(struct ocp_driver *drv)
...@@ -220,9 +216,7 @@ ocp_register_driver(struct ocp_driver *drv) ...@@ -220,9 +216,7 @@ ocp_register_driver(struct ocp_driver *drv)
drv->driver.remove = ocp_device_remove; drv->driver.remove = ocp_device_remove;
/* register with core */ /* register with core */
count = driver_register(&drv->driver); return driver_register(&drv->driver);
return count ? count : 1;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment