Browse Source

staging: android/ion: testing the wrong variable

We're testing "pdev" but we intended to test "heap_pdev".  This is a
static checker fix and it's unlikely that anyone is affected by this
bug.

Fixes: 13439479c7de ('staging: ion: Add files for parsing the devicetree')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Laura Abbott <labbott@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Dan Carpenter 9 years ago
parent
commit
0047b6e5f1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/staging/android/ion/ion_of.c

+ 1 - 1
drivers/staging/android/ion/ion_of.c

@@ -107,7 +107,7 @@ struct ion_platform_data *ion_parse_dt(struct platform_device *pdev,
 
 
 		heap_pdev = of_platform_device_create(node, heaps[i].name,
 		heap_pdev = of_platform_device_create(node, heaps[i].name,
 						      &pdev->dev);
 						      &pdev->dev);
-		if (!pdev)
+		if (!heap_pdev)
 			return ERR_PTR(-ENOMEM);
 			return ERR_PTR(-ENOMEM);
 		heap_pdev->dev.platform_data = &heaps[i];
 		heap_pdev->dev.platform_data = &heaps[i];