All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
@ 2016-07-14  6:18 ` Christophe JAILLET
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe JAILLET @ 2016-07-14  6:18 UTC (permalink / raw)
  To: jiri, idosch; +Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

'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

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
@ 2016-07-14  6:18 ` Christophe JAILLET
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe JAILLET @ 2016-07-14  6:18 UTC (permalink / raw)
  To: jiri, idosch; +Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

'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

--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
@ 2016-07-14  6:18 ` Christophe JAILLET
  0 siblings, 0 replies; 7+ messages in thread
From: Christophe JAILLET @ 2016-07-14  6:18 UTC (permalink / raw)
  To: jiri, idosch; +Cc: netdev, linux-kernel, kernel-janitors, Christophe JAILLET

'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


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
  2016-07-14  6:18 ` Christophe JAILLET
@ 2016-07-14  6:28   ` Jiri Pirko
  -1 siblings, 0 replies; 7+ messages in thread
From: Jiri Pirko @ 2016-07-14  6:28 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: jiri, idosch, netdev, linux-kernel, kernel-janitors

Thu, Jul 14, 2016 at 08:18:45AM CEST, christophe.jaillet@wanadoo.fr wrote:
>'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
>Return an explicit error code (-ENOENT) instead.
>

This is fo net-next.

Fixes: 61c503f976 ("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>


Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
@ 2016-07-14  6:28   ` Jiri Pirko
  0 siblings, 0 replies; 7+ messages in thread
From: Jiri Pirko @ 2016-07-14  6:28 UTC (permalink / raw)
  To: Christophe JAILLET; +Cc: jiri, idosch, netdev, linux-kernel, kernel-janitors

Thu, Jul 14, 2016 at 08:18:45AM CEST, christophe.jaillet@wanadoo.fr wrote:
>'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
>Return an explicit error code (-ENOENT) instead.
>

This is fo net-next.

Fixes: 61c503f976 ("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>


Thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
  2016-07-14  6:28   ` Jiri Pirko
@ 2016-07-15  5:15     ` David Miller
  -1 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2016-07-15  5:15 UTC (permalink / raw)
  To: jiri
  Cc: christophe.jaillet, jiri, idosch, netdev, linux-kernel, kernel-janitors

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 14 Jul 2016 08:28:19 +0200

> Thu, Jul 14, 2016 at 08:18:45AM CEST, christophe.jaillet@wanadoo.fr wrote:
>>'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
>>Return an explicit error code (-ENOENT) instead.
>>
> 
> This is fo net-next.
> 
> Fixes: 61c503f976 ("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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error
@ 2016-07-15  5:15     ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2016-07-15  5:15 UTC (permalink / raw)
  To: jiri
  Cc: christophe.jaillet, jiri, idosch, netdev, linux-kernel, kernel-janitors

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 14 Jul 2016 08:28:19 +0200

> Thu, Jul 14, 2016 at 08:18:45AM CEST, christophe.jaillet@wanadoo.fr wrote:
>>'vr' should be a valid pointer here, so returning 'PTR_ERR(vr)' is wrong.
>>Return an explicit error code (-ENOENT) instead.
>>
> 
> This is fo net-next.
> 
> Fixes: 61c503f976 ("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>

Applied, thanks.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-07-15  5:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-14  6:18 [PATCH] mlxsw: spectrum_router: Return -ENOENT in case of error Christophe JAILLET
2016-07-14  6:18 ` Christophe JAILLET
2016-07-14  6:18 ` Christophe JAILLET
2016-07-14  6:28 ` Jiri Pirko
2016-07-14  6:28   ` Jiri Pirko
2016-07-15  5:15   ` David Miller
2016-07-15  5:15     ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.