提交 d6a71bf7 编写于 作者: R Rickard Strandqvist 提交者: Joerg Roedel

iommu: fsl_pamu.c: Fix for possible null pointer dereference

There is otherwise a risk of a possible null pointer dereference.

Was largely found by using a static code analysis program called cppcheck.
Signed-off-by: NRickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: NBharat Bhushan <bharat.bhushan@freescale.com>
Acked-by: NVarun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 4b660a7f
...@@ -592,8 +592,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu) ...@@ -592,8 +592,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu)
/* advance to next node in cache hierarchy */ /* advance to next node in cache hierarchy */
node = of_find_node_by_phandle(*prop); node = of_find_node_by_phandle(*prop);
if (!node) { if (!node) {
pr_debug("Invalid node for cache hierarchy %s\n", pr_debug("Invalid node for cache hierarchy\n");
node->full_name);
return ~(u32)0; return ~(u32)0;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册