]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Return -ENOENT in case of error
authorChristophe Jaillet <christophe.jaillet@wanadoo.fr>
Thu, 14 Jul 2016 06:18:45 +0000 (08:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 15 Jul 2016 05:14:54 +0000 (22:14 -0700)
commitc81bfcb7bc990d8802e2d6ca294ea663df5fd605
tree43c52d75dbffeda2c31e925dd3565acbf6b08ca9
parentc83c59bcc5fcca25707dd0c8f2a78ed87fa2becc
mlxsw: spectrum_router: Return -ENOENT in case of error

'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
Return an explicit error code (-ENOENT) instead.

Fixes: 56fdbc4d1a ("mlxsw: spectrum_router: Implement fib4 add/del switchdev obj ops")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c