Skip to content

Commit

Permalink
[PATCH] macintosh: tidy-up driver_register() return values
Browse files Browse the repository at this point in the history
Remove the assumption that driver_register() returns the number of devices
bound to the driver.  In fact, it returns zero for success or a negative
error value.

All callers of macio_register_driver() either ignore the return value or
return it as the return value of a module_init() function.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Paul Mackerras <paulus@samba.org>
  • Loading branch information
Bjorn Helgaas authored and Paul Mackerras committed Mar 23, 2006
1 parent 6ea671a commit d56a3e3
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/macintosh/macio_asic.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,15 +550,12 @@ static void macio_pci_add_devices(struct macio_chip *chip)
*/
int macio_register_driver(struct macio_driver *drv)
{
int count = 0;

/* initialize common driver fields */
drv->driver.name = drv->name;
drv->driver.bus = &macio_bus_type;

/* register with core */
count = driver_register(&drv->driver);
return count ? count : 1;
return driver_register(&drv->driver);
}

/**
Expand Down

0 comments on commit d56a3e3

Please sign in to comment.