Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347292
b: refs/heads/master
c: 493682b
h: refs/heads/master
v: v3
  • Loading branch information
Konstantin Khlebnikov authored and David S. Miller committed Dec 14, 2012
1 parent efc9156 commit 05a78e6
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a0ae7b0a9e55db9b85f8abda623f145311eb951
refs/heads/master: 493682b8b8a9bf130a544d983c63f1b35df688b9
6 changes: 3 additions & 3 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,14 +127,14 @@ static inline int stmmac_register_platform(void)
}
static inline void stmmac_unregister_platform(void)
{
platform_driver_register(&stmmac_pltfr_driver);
platform_driver_unregister(&stmmac_pltfr_driver);
}
#else
static inline int stmmac_register_platform(void)
{
pr_debug("stmmac: do not register the platf driver\n");

return -EINVAL;
return 0;
}
static inline void stmmac_unregister_platform(void)
{
Expand Down Expand Up @@ -162,7 +162,7 @@ static inline int stmmac_register_pci(void)
{
pr_debug("stmmac: do not register the PCI driver\n");

return -EINVAL;
return 0;
}
static inline void stmmac_unregister_pci(void)
{
Expand Down
22 changes: 12 additions & 10 deletions trunk/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -2194,18 +2194,20 @@ int stmmac_restore(struct net_device *ndev)
*/
static int __init stmmac_init(void)
{
int err_plt = 0;
int err_pci = 0;

err_plt = stmmac_register_platform();
err_pci = stmmac_register_pci();

if ((err_pci) && (err_plt)) {
pr_err("stmmac: driver registration failed\n");
return -EINVAL;
}
int ret;

ret = stmmac_register_platform();
if (ret)
goto err;
ret = stmmac_register_pci();
if (ret)
goto err_pci;
return 0;
err_pci:
stmmac_unregister_platform();
err:
pr_err("stmmac: driver registration failed\n");
return ret;
}

static void __exit stmmac_exit(void)
Expand Down

0 comments on commit 05a78e6

Please sign in to comment.