mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 09:13:55 +08:00
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: Zhouyi Zhou <yizhouzhou@ict.ac.cn> Signed-off-by: Joerg Roedel <joro@8bytes.org>
This commit is contained in:
parent
07a0203021
commit
e28045ab2e
@ -520,7 +520,8 @@ 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 */
|
||||
kmem_cache_free(iopte_cachep, iopte);
|
||||
if (iopte)
|
||||
kmem_cache_free(iopte_cachep, iopte);
|
||||
}
|
||||
|
||||
static u32 *iopte_alloc(struct omap_iommu *obj, u32 *iopgd, u32 da)
|
||||
|
Loading…
Reference in New Issue
Block a user