Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1443096
| From | Christophe JAILLET <christophe.jaillet@wanadoo.fr> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error |
| Date | 2016-07-14 08:20 +0200 |
| Message-ID | <rUIa6-5Pz-25@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
Return an explicit error code (-ENOENT) instead.
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
---
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
index e084ea5..81418d6 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c
@@ -1803,7 +1803,7 @@ int mlxsw_sp_router_fib4_del(struct mlxsw_sp_port *mlxsw_sp_port,
sizeof(fib4->dst), fib4->dst_len);
if (!fib_entry) {
dev_warn(mlxsw_sp->bus_info->dev, "Failed to find FIB4 entry being removed.\n");
- return PTR_ERR(vr);
+ return -ENOENT;
}
mlxsw_sp_fib_entry_del(mlxsw_sp_port->mlxsw_sp, fib_entry);
mlxsw_sp_fib_entry_remove(vr->fib, fib_entry);
--
2.7.4
---
L'absence de virus dans ce courrier électronique a été vérifiée par le logiciel antivirus Avast.
https://www.avast.com/antivirus
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error Christophe JAILLET <christophe.jaillet@wanadoo.fr> - 2016-07-14 08:20 +0200
Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error Jiri Pirko <jiri@resnulli.us> - 2016-07-14 08:30 +0200
Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error David Miller <davem@davemloft.net> - 2016-07-15 07:20 +0200
csiph-web