Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL check. Change generated with coccinelle.
To: Joerg Roedel <[email protected]> To: Will Deacon <[email protected]> To: Robin Murphy <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Philipp Hahn <[email protected]> --- drivers/iommu/omap-iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 8231d7d6bb6a9202025643639a6b28e6faa84659..500a42b57a997696ff37c76f028a717ab71d01f9 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -881,7 +881,7 @@ static int omap_iommu_attach(struct omap_iommu *obj, u32 *iopgd) **/ static void omap_iommu_detach(struct omap_iommu *obj) { - if (!obj || IS_ERR(obj)) + if (IS_ERR_OR_NULL(obj)) return; spin_lock(&obj->iommu_lock); -- 2.43.0
