Skip to content

Commit

Permalink
iommu/vt-d: Remove dead code in device_notifier
Browse files Browse the repository at this point in the history
This code only runs when action == BUS_NOTIFY_REMOVED_DEVICE,
so it can't be BUS_NOTIFY_DEL_DEVICE.

Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
joergroedel committed Jan 5, 2015
1 parent 62c2216 commit 6d1b9cc
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions drivers/iommu/intel-iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -4029,14 +4029,6 @@ static int device_notifier(struct notifier_block *nb,
if (action != BUS_NOTIFY_REMOVED_DEVICE)
return 0;

/*
* If the device is still attached to a device driver we can't
* tear down the domain yet as DMA mappings may still be in use.
* Wait for the BUS_NOTIFY_UNBOUND_DRIVER event to do that.
*/
if (action == BUS_NOTIFY_DEL_DEVICE && dev->driver != NULL)
return 0;

domain = find_domain(dev);
if (!domain)
return 0;
Expand Down

0 comments on commit 6d1b9cc

Please sign in to comment.