Skip to contentSkip to conversation

OMAP: &&/|| confusion in iommu_put()

PATCH New Roel Kluin 1 participant 1 message Dec 19, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 OMAP: &&/|| confusion in iommu_put()

obj can't be both NULL and be an error pointer.

---
 arch/arm/plat-omap/iommu.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/plat-omap/iommu.c +1 -1
index c0ff1e3..463d638 100644
@@ -827,7 +827,7 @@ EXPORT_SYMBOL_GPL(iommu_get);
  **/
 void iommu_put(struct iommu *obj)
 {
-	if (!obj && IS_ERR(obj))
+	if (!obj || IS_ERR(obj))
 		return;
 
 	mutex_lock(&obj->iommu_lock);