lkml.org 
[lkml]   [2014]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH] iommu: fsl_pamu.c: Fix for possible null pointer dereference
Date


> -----Original Message-----
> From: iommu-bounces@lists.linux-foundation.org [mailto:iommu-
> bounces@lists.linux-foundation.org] On Behalf Of Rickard Strandqvist
> Sent: Saturday, May 17, 2014 10:47 PM
> To: Joerg Roedel; Grant Likely
> Cc: devicetree@vger.kernel.org; iommu@lists.linux-foundation.org; Rob Herring;
> linux-kernel@vger.kernel.org; Rickard Strandqvist
> Subject: [PATCH] iommu: fsl_pamu.c: Fix for possible null pointer dereference
>
> There is otherwise a risk of a possible null pointer dereference.

You are right.

>
> 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>


Thanks
-Bharat

> ---
> drivers/iommu/fsl_pamu.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iommu/fsl_pamu.c b/drivers/iommu/fsl_pamu.c index
> cba0498..b99dd88 100644
> --- a/drivers/iommu/fsl_pamu.c
> +++ b/drivers/iommu/fsl_pamu.c
> @@ -592,8 +592,7 @@ found_cpu_node:
> /* 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;
> }
> }
> --
> 1.7.10.4
>
> _______________________________________________
> iommu mailing list
> iommu@lists.linux-foundation.org
> https://lists.linuxfoundation.org/mailman/listinfo/iommu


\
 
 \ /
  Last update: 2014-05-21 06:42    [W:0.060 / U:0.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site