2013-06-01 09:55:56

by Thomas Meyer

[permalink] [raw]
Subject: [PATCH] netdev: Cocci spatch "ptr_ret.spatch"


Signed-off-by: Thomas Meyer <[email protected]>
---

diff -u -p a/drivers/net/ethernet/i825xx/82596.c b/drivers/net/ethernet/i825xx/82596.c
--- a/drivers/net/ethernet/i825xx/82596.c
+++ b/drivers/net/ethernet/i825xx/82596.c
@@ -1527,9 +1527,7 @@ int __init init_module(void)
if (debug >= 0)
i596_debug = debug;
dev_82596 = i82596_probe(-1);
- if (IS_ERR(dev_82596))
- return PTR_ERR(dev_82596);
- return 0;
+ return PTR_RET(dev_82596);
}

void __exit cleanup_module(void)