提交 3ffd880d 编写于 作者: S Silviu-Mihai Popescu 提交者: David S. Miller

ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR

This uses PTR_RET instead of IS_ERR and PTR_ERR in order to increase
readability.
Signed-off-by: NSilviu-Mihai Popescu <silviupopescu1990@gmail.com>
Acked-by: N&lt;Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 b6bb4dfc
...@@ -1147,9 +1147,7 @@ static struct net_device *atarilance_dev; ...@@ -1147,9 +1147,7 @@ static struct net_device *atarilance_dev;
static int __init atarilance_module_init(void) static int __init atarilance_module_init(void)
{ {
atarilance_dev = atarilance_probe(-1); atarilance_dev = atarilance_probe(-1);
if (IS_ERR(atarilance_dev)) return PTR_RET(atarilance_dev);
return PTR_ERR(atarilance_dev);
return 0;
} }
static void __exit atarilance_module_exit(void) static void __exit atarilance_module_exit(void)
......
...@@ -188,9 +188,7 @@ static struct net_device *dev_mvme147_lance; ...@@ -188,9 +188,7 @@ static struct net_device *dev_mvme147_lance;
int __init init_module(void) int __init init_module(void)
{ {
dev_mvme147_lance = mvme147lance_probe(-1); dev_mvme147_lance = mvme147lance_probe(-1);
if (IS_ERR(dev_mvme147_lance)) return PTR_RET(dev_mvme147_lance);
return PTR_ERR(dev_mvme147_lance);
return 0;
} }
void __exit cleanup_module(void) void __exit cleanup_module(void)
......
...@@ -1238,7 +1238,7 @@ MODULE_PARM_DESC(dma, "ni6510 ISA DMA channel (ignored for some cards)"); ...@@ -1238,7 +1238,7 @@ MODULE_PARM_DESC(dma, "ni6510 ISA DMA channel (ignored for some cards)");
int __init init_module(void) int __init init_module(void)
{ {
dev_ni65 = ni65_probe(-1); 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) void __exit cleanup_module(void)
......
...@@ -940,9 +940,7 @@ static struct net_device *sun3lance_dev; ...@@ -940,9 +940,7 @@ static struct net_device *sun3lance_dev;
int __init init_module(void) int __init init_module(void)
{ {
sun3lance_dev = sun3lance_probe(-1); sun3lance_dev = sun3lance_probe(-1);
if (IS_ERR(sun3lance_dev)) return PTR_RET(sun3lance_dev);
return PTR_ERR(sun3lance_dev);
return 0;
} }
void __exit cleanup_module(void) void __exit cleanup_module(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册