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

Commit e28045ab authored by Zhouyi Zhou's avatar Zhouyi Zhou Committed by Joerg Roedel
Browse files

iommu/omap: Check for NULL in iopte_free()



The iopte_free() function should check for NULL because
kmem_cache_free() will panic on NULL argument.

Signed-off-by: default avatarZhouyi Zhou <yizhouzhou@ict.ac.cn>
Signed-off-by: default avatarJoerg Roedel <joro@8bytes.org>
parent 07a02030
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -520,6 +520,7 @@ static void flush_iopte_range(u32 *first, u32 *last)
static void iopte_free(u32 *iopte)
{
	/* Note: freed iopte's must be clean ready for re-use */
	if (iopte)
		kmem_cache_free(iopte_cachep, iopte);
}