Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 423595e8 authored by Amitoj Kaur Chawla's avatar Amitoj Kaur Chawla Committed by Joerg Roedel
Browse files

iommu/exynos: Fix error handling for of_platform_device_create



of_platform_device_create returns NULL on error so an IS_ERR test is
incorrect here and a NULL check is required.

The Coccinelle semantic patch used to make this change is as follows:
@@
expression e;
@@

  e = of_platform_device_create(...);
if(
-    IS_ERR(e)
+    !e
    )
    {
  <+...
  return
- PTR_ERR(e)
+ -ENODEV
  ;
  ...+>
  }

Signed-off-by: default avatarAmitoj Kaur Chawla <amitoj1606@gmail.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 29b4817d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment