phylib: Support registering a bunch of drivers
If registering of one of them fails, all already registered drivers of this module will be unregistered. Use the new register/unregister functions in all drivers registering more than one driver. amd.c, realtek.c: Simplify: directly return registration result. Tested with broadcom.c All others compile-tested. Signed-off-by: Christian Hohnstaedt <chohnstaedt@innominate.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
567990cfcc
commit
d5bf9071e7
@@ -77,13 +77,7 @@ static struct phy_driver am79c_driver = {
|
||||
|
||||
static int __init am79c_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = phy_driver_register(&am79c_driver);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return 0;
|
||||
return phy_driver_register(&am79c_driver);
|
||||
}
|
||||
|
||||
static void __exit am79c_exit(void)
|
||||
|
Reference in New Issue
Block a user