diff options
author | Christian Hohnstaedt <chohnstaedt@innominate.com> | 2012-07-04 05:44:34 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-09 00:10:56 -0700 |
commit | d5bf9071e71a4db85a0eea6236ef94a29fc3eec9 (patch) | |
tree | cf91cd107a5eda19dc8a1024b0c9b2115edf4988 /drivers/net/phy/amd.c | |
parent | 567990cfccafc580b03b1fb501adf63132c12dcc (diff) | |
download | op-kernel-dev-d5bf9071e71a4db85a0eea6236ef94a29fc3eec9.zip op-kernel-dev-d5bf9071e71a4db85a0eea6236ef94a29fc3eec9.tar.gz |
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>
Diffstat (limited to 'drivers/net/phy/amd.c')
-rw-r--r-- | drivers/net/phy/amd.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/phy/amd.c b/drivers/net/phy/amd.c index cfabd5f..a3fb5ce 100644 --- a/drivers/net/phy/amd.c +++ b/drivers/net/phy/amd.c @@ -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) |