Skip to contentSkip to conversation

amdkfd: delete some dead code

PATCH In review Dan Carpenter 2 participants 2 messages Nov 25, 2014 – Nov 26, 2014

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amdkfd: delete some dead code

This is dead code. We don't need to unbind here, we can just return directly.

drivers/gpu/drm/amd/amdkfd/kfd_process.c +0 -5
index a17e2dd..b4f49ac 100644
@@ -348,11 +348,6 @@ struct kfd_process_device *kfd_bind_process_to_device(struct kfd_dev *dev,
 	if (err < 0)
 		return ERR_PTR(err);
 
-	if (err < 0) {
-		amd_iommu_unbind_pasid(dev->pdev, p->pasid);
-		return ERR_PTR(err);
-	}
-
 	pdd->bound = true;
 
 	return pdd;
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Dan Carpenter

This is dead code. We don't need to unbind here, we can just return directly.

Patch is:

And applied to my 3.19-next-wip tree.
Thanks!

Oded

Quoted 17 lines
drivers/gpu/drm/amd/amdkfd/kfd_process.c +0 -5
index a17e2dd..b4f49ac 100644
@@ -348,11 +348,6 @@ struct kfd_process_device *kfd_bind_process_to_device(struct kfd_dev *dev,
 	if (err < 0)
 		return ERR_PTR(err);
 
-	if (err < 0) {
-		amd_iommu_unbind_pasid(dev->pdev, p->pasid);
-		return ERR_PTR(err);
-	}
-
 	pdd->bound = true;
 
 	return pdd;