projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
07a0203
)
iommu/omap: Check for NULL in iopte_free()
author
Zhouyi Zhou
<zhouzhouyi@gmail.com>
Wed, 5 Mar 2014 10:20:19 +0000
(18:20 +0800)
committer
Joerg Roedel
<joro@8bytes.org>
Wed, 5 Mar 2014 22:02:40 +0000
(23:02 +0100)
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>
drivers/iommu/omap-iommu.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/iommu/omap-iommu.c
b/drivers/iommu/omap-iommu.c
index 8acea87cbc0e6c14aeefe725d86f01ef67d04bc6..7fcbfc498fa93c2527968191e6658be99eaa7b2d 100644
(file)
--- a/
drivers/iommu/omap-iommu.c
+++ b/
drivers/iommu/omap-iommu.c
@@
-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)