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 <[email protected]>
Reviewed-by: Bharat Bhushan <[email protected]>
Acked-by: Varun Sethi <[email protected]>
Signed-off-by: Joerg Roedel <[email protected]>
  • Loading branch information
Rickard Strandqvist authored and joergroedel 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.