Skip to content

Commit

Permalink
iommu: fsl_pamu.c: Fix for possible null pointer dereference
Browse files Browse the repository at this point in the history
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: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
Reviewed-by: Bharat Bhushan <bharat.bhushan@freescale.com>
Acked-by: Varun Sethi <Varun.Sethi@freescale.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
  • Loading branch information
Rickard Strandqvist authored and Joerg Roedel committed May 26, 2014
1 parent 4b660a7 commit d6a71bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/iommu/fsl_pamu.c
Original file line number Diff line number Diff line change
Expand Up @@ -592,8 +592,7 @@ u32 get_stash_id(u32 stash_dest_hint, u32 vcpu)
/* advance to next node in cache hierarchy */
node = of_find_node_by_phandle(*prop);
if (!node) {
pr_debug("Invalid node for cache hierarchy %s\n",
node->full_name);
pr_debug("Invalid node for cache hierarchy\n");
return ~(u32)0;
}
}
Expand Down

0 comments on commit d6a71bf

Please sign in to comment.