Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c1ab600 authored by Suman Anna's avatar Suman Anna Committed by Joerg Roedel
Browse files

iommu/omap: Replace BUG() in iopgtable_store_entry_core()



The iopgtable_store_entry_core() function uses a BUG() statement
for an unsupported page size entry programming. Replace this with
a less severe WARN_ON() and perform a graceful bailout on error.

Signed-off-by: default avatarSuman Anna <s-anna@ti.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 521f4082
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -628,10 +628,12 @@ iopgtable_store_entry_core(struct omap_iommu *obj, struct iotlb_entry *e)
		break;
	default:
		fn = NULL;
		BUG();
		break;
	}

	if (WARN_ON(!fn))
		return -EINVAL;

	prot = get_iopte_attr(e);

	spin_lock(&obj->page_table_lock);