* [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR
@ 2013-03-12 7:48 Silviu-Mihai Popescu
2013-03-12 9:44 ` Geert Uytterhoeven
2013-03-12 10:58 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Silviu-Mihai Popescu @ 2013-03-12 7:48 UTC (permalink / raw)
To: netdev; +Cc: davem, geert, joe, dhowells, linux-kernel, Silviu-Mihai Popescu
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>
---
drivers/net/ethernet/amd/atarilance.c | 4 +---
drivers/net/ethernet/amd/mvme147.c | 4 +---
drivers/net/ethernet/amd/ni65.c | 2 +-
drivers/net/ethernet/amd/sun3lance.c | 4 +---
4 files changed, 4 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/amd/atarilance.c b/drivers/net/ethernet/amd/atarilance.c
index ab9bedb..e8d0ef5 100644
--- a/drivers/net/ethernet/amd/atarilance.c
+++ b/drivers/net/ethernet/amd/atarilance.c
@@ -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)
diff --git a/drivers/net/ethernet/amd/mvme147.c b/drivers/net/ethernet/amd/mvme147.c
index 9af3c30..a51497c 100644
--- a/drivers/net/ethernet/amd/mvme147.c
+++ b/drivers/net/ethernet/amd/mvme147.c
@@ -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)
diff --git a/drivers/net/ethernet/amd/ni65.c b/drivers/net/ethernet/amd/ni65.c
index 013b651..26fc0ce 100644
--- a/drivers/net/ethernet/amd/ni65.c
+++ b/drivers/net/ethernet/amd/ni65.c
@@ -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)
diff --git a/drivers/net/ethernet/amd/sun3lance.c b/drivers/net/ethernet/amd/sun3lance.c
index de412d3..4375abe 100644
--- a/drivers/net/ethernet/amd/sun3lance.c
+++ b/drivers/net/ethernet/amd/sun3lance.c
@@ -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)
--
1.7.9.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR
2013-03-12 7:48 [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu
@ 2013-03-12 9:44 ` Geert Uytterhoeven
2013-03-12 10:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Geert Uytterhoeven @ 2013-03-12 9:44 UTC (permalink / raw)
To: Silviu-Mihai Popescu; +Cc: netdev, davem, joe, dhowells, linux-kernel
On Tue, Mar 12, 2013 at 8:48 AM, Silviu-Mihai Popescu
<silviupopescu1990@gmail.com> wrote:
> 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>
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR
2013-03-12 7:48 [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu
2013-03-12 9:44 ` Geert Uytterhoeven
@ 2013-03-12 10:58 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2013-03-12 10:58 UTC (permalink / raw)
To: silviupopescu1990; +Cc: netdev, geert, joe, dhowells, linux-kernel
From: Silviu-Mihai Popescu <silviupopescu1990@gmail.com>
Date: Tue, 12 Mar 2013 09:48:07 +0200
> 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>
Applied.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-03-12 10:58 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-12 7:48 [PATCH] ethernet: amd: use PTR_RET instead of IS_ERR + PTR_ERR Silviu-Mihai Popescu
2013-03-12 9:44 ` Geert Uytterhoeven
2013-03-12 10:58 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).