[PATCH 50/61] iommu: Prefer IS_ERR_OR_NULL over manual NULL check
Philipp Hahn
phahn-oss at avm.de
Tue Mar 10 04:49:16 PDT 2026
Prefer using IS_ERR_OR_NULL() over using IS_ERR() and a manual NULL
check.
Change generated with coccinelle.
To: Joerg Roedel <joro at 8bytes.org>
To: Will Deacon <will at kernel.org>
To: Robin Murphy <robin.murphy at arm.com>
Cc: iommu at lists.linux.dev
Cc: linux-kernel at vger.kernel.org
Signed-off-by: Philipp Hahn <phahn-oss at avm.de>
---
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
More information about the Linux-rockchip
mailing list