mirror of
				https://github.com/torvalds/linux.git
				synced 2025-10-31 16:48:26 +02:00 
			
		
		
		
	rdmacg: Fixed uninitialized current resource usage
Fixed warning reported by kbuild test robot. When reading current resource usage value, when no resources are allocated, its possible that it can report a uninitialized value for current resource usage. This fix avoids it by initializing it to zero as no resource is allocated. Signed-off-by: Parav Pandit <pandit.parav@gmail.com> Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
		
							parent
							
								
									9c1e67f941
								
							
						
					
					
						commit
						7896dfb0a6
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		|  | @ -518,6 +518,8 @@ static void print_rpool_values(struct seq_file *sf, | |||
| 		} else { | ||||
| 			if (rpool) | ||||
| 				value = rpool->resources[i].usage; | ||||
| 			else | ||||
| 				value = 0; | ||||
| 		} | ||||
| 
 | ||||
| 		if (value == S32_MAX) | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue
	
	 Parav Pandit
						Parav Pandit