mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	RDS: Clean up error handling in rds_cmsg_rdma_args
We don't need to set ret = 0 at the end -- it's initialized to 0. Also, don't increment s_send_rdma stat if we're exiting with an error. Signed-off-by: Andy Grover <andy.grover@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
		
							parent
							
								
									a09f69c49b
								
							
						
					
					
						commit
						f4a3fc03c1
					
				
					 1 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -664,13 +664,12 @@ int rds_cmsg_rdma_args(struct rds_sock *rs, struct rds_message *rm,
 | 
			
		|||
	}
 | 
			
		||||
	op->op_bytes = nr_bytes;
 | 
			
		||||
 | 
			
		||||
	ret = 0;
 | 
			
		||||
out:
 | 
			
		||||
	kfree(pages);
 | 
			
		||||
	if (ret)
 | 
			
		||||
		rds_rdma_free_op(op);
 | 
			
		||||
 | 
			
		||||
	rds_stats_inc(s_send_rdma);
 | 
			
		||||
	else
 | 
			
		||||
		rds_stats_inc(s_send_rdma);
 | 
			
		||||
 | 
			
		||||
	return ret;
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue