mirror of
				git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
				synced 2025-10-31 16:54:21 +00:00 
			
		
		
		
	iommu/tegra-smmu: Fix return value check in tegra_smmu_group_get()
In case of error, the function iommu_group_alloc() returns ERR_PTR() and
never returns NULL. The NULL test in the return value check should be
replaced with IS_ERR().
Fixes: 7f4c9176f7 ("iommu/tegra: Allow devices to be grouped")
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
			
			
This commit is contained in:
		
							parent
							
								
									7f4c9176f7
								
							
						
					
					
						commit
						83476bfaf6
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		|  | @ -832,7 +832,7 @@ static struct iommu_group *tegra_smmu_group_get(struct tegra_smmu *smmu, | |||
| 	group->soc = soc; | ||||
| 
 | ||||
| 	group->group = iommu_group_alloc(); | ||||
| 	if (!group->group) { | ||||
| 	if (IS_ERR(group->group)) { | ||||
| 		devm_kfree(smmu->dev, group); | ||||
| 		mutex_unlock(&smmu->lock); | ||||
| 		return NULL; | ||||
|  |  | |||
		Loading…
	
	Add table
		
		Reference in a new issue
	
	 Wei Yongjun
						Wei Yongjun