* [PATCH net-next] team: Simplify return path of team_newlink
@ 2014-08-05 6:58 Toshiaki Makita
2014-08-05 7:06 ` Jiri Pirko
2014-08-05 23:38 ` David Miller
0 siblings, 2 replies; 3+ messages in thread
From: Toshiaki Makita @ 2014-08-05 6:58 UTC (permalink / raw)
To: David S . Miller, Jiri Pirko; +Cc: Toshiaki Makita, netdev
The variable "err" is not necessary.
Return register_netdevice() directly.
Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
---
drivers/net/team/team.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c
index b4958c7..ef10302 100644
--- a/drivers/net/team/team.c
+++ b/drivers/net/team/team.c
@@ -2045,16 +2045,10 @@ static void team_setup(struct net_device *dev)
static int team_newlink(struct net *src_net, struct net_device *dev,
struct nlattr *tb[], struct nlattr *data[])
{
- int err;
-
if (tb[IFLA_ADDRESS] == NULL)
eth_hw_addr_random(dev);
- err = register_netdevice(dev);
- if (err)
- return err;
-
- return 0;
+ return register_netdevice(dev);
}
static int team_validate(struct nlattr *tb[], struct nlattr *data[])
--
1.8.1.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] team: Simplify return path of team_newlink
2014-08-05 6:58 [PATCH net-next] team: Simplify return path of team_newlink Toshiaki Makita
@ 2014-08-05 7:06 ` Jiri Pirko
2014-08-05 23:38 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: Jiri Pirko @ 2014-08-05 7:06 UTC (permalink / raw)
To: Toshiaki Makita; +Cc: David S . Miller, netdev
Tue, Aug 05, 2014 at 08:58:50AM CEST, makita.toshiaki@lab.ntt.co.jp wrote:
>The variable "err" is not necessary.
>Return register_netdevice() directly.
>
>Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Acked-by: Jiri Pirko <jiri@resnulli.us>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] team: Simplify return path of team_newlink
2014-08-05 6:58 [PATCH net-next] team: Simplify return path of team_newlink Toshiaki Makita
2014-08-05 7:06 ` Jiri Pirko
@ 2014-08-05 23:38 ` David Miller
1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2014-08-05 23:38 UTC (permalink / raw)
To: makita.toshiaki; +Cc: jiri, netdev
From: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Date: Tue, 5 Aug 2014 15:58:50 +0900
> The variable "err" is not necessary.
> Return register_netdevice() directly.
>
> Signed-off-by: Toshiaki Makita <makita.toshiaki@lab.ntt.co.jp>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-08-05 23:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-05 6:58 [PATCH net-next] team: Simplify return path of team_newlink Toshiaki Makita
2014-08-05 7:06 ` Jiri Pirko
2014-08-05 23:38 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox