All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()
@ 2017-11-02 11:15 Wei Yongjun
  2017-11-02 15:25 ` Kumar Sanghvi
  2017-11-03  5:24 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2017-11-02 11:15 UTC (permalink / raw)
  To: Ganesh Goudar, Kumar Sanghvi; +Cc: Wei Yongjun, netdev

Fix to return a negative error code from thecxgb4_alloc_atid()
error handling case instead of 0.

Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
index abab67d..5980f30 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
@@ -1110,8 +1110,10 @@ static int cxgb4_set_hash_filter(struct net_device *dev,
 	}
 
 	atid = cxgb4_alloc_atid(t, f);
-	if (atid < 0)
+	if (atid < 0) {
+		ret = atid;
 		goto free_smt;
+	}
 
 	iconf = adapter->params.tp.ingress_config;
 	if (iconf & VNIC_F) {

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

* Re: [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()
  2017-11-02 11:15 [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter() Wei Yongjun
@ 2017-11-02 15:25 ` Kumar Sanghvi
  2017-11-03  5:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Sanghvi @ 2017-11-02 15:25 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: Ganesh Goudar, netdev

On Thursday, November 11/02/17, 2017 at 11:15:07 +0000, Wei Yongjun wrote:
> Fix to return a negative error code from thecxgb4_alloc_atid()
> error handling case instead of 0.
> 
> Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
> index abab67d..5980f30 100644
> --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
> +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_filter.c
> @@ -1110,8 +1110,10 @@ static int cxgb4_set_hash_filter(struct net_device *dev,
>  	}
>  
>  	atid = cxgb4_alloc_atid(t, f);
> -	if (atid < 0)
> +	if (atid < 0) {
> +		ret = atid;
>  		goto free_smt;
> +	}
>  
>  	iconf = adapter->params.tp.ingress_config;
>  	if (iconf & VNIC_F) {
>

Thank you for the fix.

Acked-By: Kumar Sanghvi <kumaras@chelsio.com> 

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

* Re: [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter()
  2017-11-02 11:15 [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter() Wei Yongjun
  2017-11-02 15:25 ` Kumar Sanghvi
@ 2017-11-03  5:24 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2017-11-03  5:24 UTC (permalink / raw)
  To: weiyongjun1; +Cc: ganeshgr, kumaras, netdev

From: Wei Yongjun <weiyongjun1@huawei.com>
Date: Thu, 2 Nov 2017 11:15:07 +0000

> Fix to return a negative error code from thecxgb4_alloc_atid()
> error handling case instead of 0.
> 
> Fixes: 12b276fbf6e0 ("cxgb4: add support to create hash filters")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>

Applied.

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

end of thread, other threads:[~2017-11-03  5:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-02 11:15 [PATCH net-next] cxgb4: fix error return code in cxgb4_set_hash_filter() Wei Yongjun
2017-11-02 15:25 ` Kumar Sanghvi
2017-11-03  5:24 ` 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.