diff mbox series

[net-next] tipc: fix return value check in tipc_mcast_send_sync()

Message ID 20190321085810.96037-1-weiyongjun1@huawei.com
State Changes Requested
Delegated to: David Miller
Headers show
Series [net-next] tipc: fix return value check in tipc_mcast_send_sync() | expand

Commit Message

Wei Yongjun March 21, 2019, 8:58 a.m. UTC
Fix the return value check which testing the wrong variable
in tipc_mcast_send_sync().

Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 net/tipc/bcast.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Dumazet March 21, 2019, 8:58 a.m. UTC | #1
On 03/21/2019 01:58 AM, Wei Yongjun wrote:
> Fix the return value check which testing the wrong variable
> in tipc_mcast_send_sync().
> 
> Fixes: c55c8edafa91 ("tipc: smooth change between replicast and broadcast")
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
>  net/tipc/bcast.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
> index 5264a8ff6e01..a41c0fa9c650 100644
> --- a/net/tipc/bcast.c
> +++ b/net/tipc/bcast.c
> @@ -329,7 +329,7 @@ static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
>  
>  	/* Allocate dummy message */
>  	_skb = tipc_buf_acquire(MCAST_H_SIZE, GFP_KERNEL);
> -	if (!skb)
> +	if (!_skb)
>  		return -ENOMEM;
>  
>  	/* Preparing for 'synching' header */
> 
> 
> 

Thanks for the patch, but some 'Reported-by:' tags are missing :/
diff mbox series

Patch

diff --git a/net/tipc/bcast.c b/net/tipc/bcast.c
index 5264a8ff6e01..a41c0fa9c650 100644
--- a/net/tipc/bcast.c
+++ b/net/tipc/bcast.c
@@ -329,7 +329,7 @@  static int tipc_mcast_send_sync(struct net *net, struct sk_buff *skb,
 
 	/* Allocate dummy message */
 	_skb = tipc_buf_acquire(MCAST_H_SIZE, GFP_KERNEL);
-	if (!skb)
+	if (!_skb)
 		return -ENOMEM;
 
 	/* Preparing for 'synching' header */