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: Suman Anna <s-anna@ti.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
This commit is contained in:
Suman Anna 2016-04-04 17:46:19 -05:00 committed by Joerg Roedel
parent 521f40823e
commit 7c1ab60008
1 changed files with 3 additions and 1 deletions

View File

@ -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);