From: Joerg Roedel Date: Thu, 13 Aug 2015 09:15:13 +0000 (+0200) Subject: iommu/msm: Use BUG_ON instead of if () BUG() X-Git-Tag: v5.15~15110^2^3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6e6cfbc859481b2af7282170ff732fa5e035d842;p=platform%2Fkernel%2Flinux-starfive.git iommu/msm: Use BUG_ON instead of if () BUG() Found by a coccicheck script. Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/msm_iommu.c b/drivers/iommu/msm_iommu.c index 15a2063..e321fa5 100644 --- a/drivers/iommu/msm_iommu.c +++ b/drivers/iommu/msm_iommu.c @@ -106,8 +106,8 @@ static int __flush_iotlb(struct iommu_domain *domain) #endif 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); BUG_ON(!iommu_drvdata);