[PATCH][SRU Bionic] firmware: arm_sdei: Fix return value check in sdei_present_dt()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH][SRU Bionic] firmware: arm_sdei: Fix return value check in sdei_present_dt()

dann frazier-4
From: Wei Yongjun <[hidden email]>

BugLink: https://bugs.launchpad.net/bugs/1768663

In case of error, the function of_platform_device_create() returns
NULL pointer not ERR_PTR(). The IS_ERR() test in the return value
check should be replaced with NULL test.

Fixes: 677a60bd2003 ("firmware: arm_sdei: Discover SDEI support via ACPI")
Acked-by: James Morse <[hidden email]>
Signed-off-by: Wei Yongjun <[hidden email]>
Signed-off-by: Catalin Marinas <[hidden email]>
(cherry picked from commit 2f7aacf795e0192648b51674aef90e755e02408c)
Signed-off-by: dann frazier <[hidden email]>
---
 drivers/firmware/arm_sdei.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
index 8f6563c595e5..1ea71640fdc2 100644
--- a/drivers/firmware/arm_sdei.c
+++ b/drivers/firmware/arm_sdei.c
@@ -1023,7 +1023,7 @@ static bool __init sdei_present_dt(void)
 
  pdev = of_platform_device_create(np, sdei_driver.driver.name, NULL);
  of_node_put(np);
- if (IS_ERR(pdev))
+ if (!pdev)
  return false;
 
  return true;
--
2.17.0


--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU Bionic] firmware: arm_sdei: Fix return value check in sdei_present_dt()

Kleber Souza
On 05/02/18 23:27, dann frazier wrote:

> From: Wei Yongjun <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1768663
>
> In case of error, the function of_platform_device_create() returns
> NULL pointer not ERR_PTR(). The IS_ERR() test in the return value
> check should be replaced with NULL test.
>
> Fixes: 677a60bd2003 ("firmware: arm_sdei: Discover SDEI support via ACPI")
> Acked-by: James Morse <[hidden email]>
> Signed-off-by: Wei Yongjun <[hidden email]>
> Signed-off-by: Catalin Marinas <[hidden email]>
> (cherry picked from commit 2f7aacf795e0192648b51674aef90e755e02408c)
> Signed-off-by: dann frazier <[hidden email]>

Acked-by: Kleber Sacilotto de Souza <[hidden email]>

> ---
>  drivers/firmware/arm_sdei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
> index 8f6563c595e5..1ea71640fdc2 100644
> --- a/drivers/firmware/arm_sdei.c
> +++ b/drivers/firmware/arm_sdei.c
> @@ -1023,7 +1023,7 @@ static bool __init sdei_present_dt(void)
>  
>   pdev = of_platform_device_create(np, sdei_driver.driver.name, NULL);
>   of_node_put(np);
> - if (IS_ERR(pdev))
> + if (!pdev)
>   return false;
>  
>   return true;
>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

ACK: [PATCH][SRU Bionic] firmware: arm_sdei: Fix return value check in sdei_present_dt()

Po-Hsu Lin (Sam)
In reply to this post by dann frazier-4
Clean cherry-pick, looks good to me,
Acked-by: Po-Hsu Lin <[hidden email]>

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team
Reply | Threaded
Open this post in threaded view
|

APPLIED: [PATCH][SRU Bionic] firmware: arm_sdei: Fix return value check in sdei_present_dt()

Kleber Souza
In reply to this post by dann frazier-4
On 05/02/18 23:27, dann frazier wrote:

> From: Wei Yongjun <[hidden email]>
>
> BugLink: https://bugs.launchpad.net/bugs/1768663
>
> In case of error, the function of_platform_device_create() returns
> NULL pointer not ERR_PTR(). The IS_ERR() test in the return value
> check should be replaced with NULL test.
>
> Fixes: 677a60bd2003 ("firmware: arm_sdei: Discover SDEI support via ACPI")
> Acked-by: James Morse <[hidden email]>
> Signed-off-by: Wei Yongjun <[hidden email]>
> Signed-off-by: Catalin Marinas <[hidden email]>
> (cherry picked from commit 2f7aacf795e0192648b51674aef90e755e02408c)
> Signed-off-by: dann frazier <[hidden email]>
> ---
>  drivers/firmware/arm_sdei.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/arm_sdei.c b/drivers/firmware/arm_sdei.c
> index 8f6563c595e5..1ea71640fdc2 100644
> --- a/drivers/firmware/arm_sdei.c
> +++ b/drivers/firmware/arm_sdei.c
> @@ -1023,7 +1023,7 @@ static bool __init sdei_present_dt(void)
>  
>   pdev = of_platform_device_create(np, sdei_driver.driver.name, NULL);
>   of_node_put(np);
> - if (IS_ERR(pdev))
> + if (!pdev)
>   return false;
>  
>   return true;
>

Applied to bionic/master-next branch.

Thanks,
Kleber

--
kernel-team mailing list
[hidden email]
https://lists.ubuntu.com/mailman/listinfo/kernel-team