ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR
authorSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Mon, 11 Mar 2013 21:48:07 +0000 (21:48 +0000)
committerDavid S. Miller <davem@davemloft.net>
Tue, 12 Mar 2013 10:57:22 +0000 (06:57 -0400)
This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
readability.

Signed-off-by: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: <Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/amd/atarilance.c
drivers/net/ethernet/amd/mvme147.c
drivers/net/ethernet/amd/ni65.c
drivers/net/ethernet/amd/sun3lance.c

index ab9bedb8d2760be2739df30001aca7517f5dca88..e8d0ef508f48f79baa7024219248c22b09cf95a9 100644 (file)
@@ -1147,9 +1147,7 @@ static struct net_device *atarilance_dev;
 static int __init atarilance_module_init(void)
 {
        atarilance_dev = atarilance_probe(-1);
-       if (IS_ERR(atarilance_dev))
-               return PTR_ERR(atarilance_dev);
-       return 0;
+       return PTR_RET(atarilance_dev);
 }
 
 static void __exit atarilance_module_exit(void)
index 9af3c307862c1aead9d545aa51588385849325c0..a51497c9d2afb2fceda2f61d96d27c914eaa4700 100644 (file)
@@ -188,9 +188,7 @@ static struct net_device *dev_mvme147_lance;
 int __init init_module(void)
 {
        dev_mvme147_lance = mvme147lance_probe(-1);
-       if (IS_ERR(dev_mvme147_lance))
-               return PTR_ERR(dev_mvme147_lance);
-       return 0;
+       return PTR_RET(dev_mvme147_lance);
 }
 
 void __exit cleanup_module(void)
index 013b651085369c83e20db7b4c5f868c382c5dccd..26fc0ce0faa3299929895e47b5a4fe5288687630 100644 (file)
@@ -1238,7 +1238,7 @@ MODULE_PARM_DESC(dma, "ni6510 ISA DMA channel (ignored for some cards)");
 int __init init_module(void)
 {
        dev_ni65 = ni65_probe(-1);
-       return IS_ERR(dev_ni65) ? PTR_ERR(dev_ni65) : 0;
+       return PTR_RET(dev_ni65);
 }
 
 void __exit cleanup_module(void)
index de412d331a72b895a9842b9f6618032e73943325..4375abe61da1b4233678dd999784056a3237f3b4 100644 (file)
@@ -940,9 +940,7 @@ static struct net_device *sun3lance_dev;
 int __init init_module(void)
 {
        sun3lance_dev = sun3lance_probe(-1);
-       if (IS_ERR(sun3lance_dev))
-               return PTR_ERR(sun3lance_dev);
-       return 0;
+       return PTR_RET(sun3lance_dev);
 }
 
 void __exit cleanup_module(void)