]> git.baikalelectronics.ru Git - kernel.git/commit
rtnl: simplify error return path in rtnl_create_link()
authorTobias Klauser <tklauser@distanz.ch>
Mon, 20 Feb 2017 15:32:06 +0000 (16:32 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 21 Feb 2017 17:17:43 +0000 (12:17 -0500)
commit15aec3e2db89e1f76a99c881e6c745d11faaeb5a
tree63be18c67fbc39d92d986d9b4dcaa9cbbb5cb687
parent8c6b911d7ba58d3e60efa039023a8ed66de733c1
rtnl: simplify error return path in rtnl_create_link()

There is only one possible error path which reaches the err label, so
return ERR_PTR(-ENOMEM) directly if alloc_netdev_mqs() fails. This also
allows to omit the err variable.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c