Skip to content

Commit

Permalink
iommu: fix initialization without 'add_device' callback
Browse files Browse the repository at this point in the history
IOMMU drivers can be initialized from of_iommu helpers. Such drivers don't
need to provide device_add callbacks to operate properly, so there is no
need to fail initialization if the callback is missing.

Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
  • Loading branch information
Marek Szyprowski authored and Will Deacon committed Dec 1, 2014
1 parent 7eba1d5 commit 461bfb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -737,7 +737,7 @@ static int add_iommu_group(struct device *dev, void *data)
const struct iommu_ops *ops = cb->ops;

if (!ops->add_device)
return -ENODEV;
return 0;

WARN_ON(dev->iommu_group);

Expand Down

0 comments on commit 461bfb3

Please sign in to comment.