iommu/msm: Use BUG_ON instead of if () BUG()

Found by a coccicheck script.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Joerg Roedel 2015-08-13 11:15:13 +02:00
parent f7644cbfcd
commit 6e6cfbc859
1 changed files with 2 additions and 2 deletions

View File

@ -106,8 +106,8 @@ static int __flush_iotlb(struct iommu_domain *domain)
#endif #endif
list_for_each_entry(ctx_drvdata, &priv->list_attached, attached_elm) { list_for_each_entry(ctx_drvdata, &priv->list_attached, attached_elm) {
if (!ctx_drvdata->pdev || !ctx_drvdata->pdev->dev.parent)
BUG(); BUG_ON(!ctx_drvdata->pdev || !ctx_drvdata->pdev->dev.parent);
iommu_drvdata = dev_get_drvdata(ctx_drvdata->pdev->dev.parent); iommu_drvdata = dev_get_drvdata(ctx_drvdata->pdev->dev.parent);
BUG_ON(!iommu_drvdata); BUG_ON(!iommu_drvdata);