2020-07-10 09:31:49

by Lu Wei

[permalink] [raw]
Subject: [PATCH v3 0/2] Fix return value check

In the function check_acpi_dev(), if it fails to create
platform device, the return value is ERR_PTR() or NULL.
Thus it must use IS_ERR_OR_NULL to check return value.

---
v2->v3
- Modify format
v3->v4
- Change commit number to 12 characters

Lu Wei (2):
intel-hid: Fix return value check in check_acpi_dev()
intel-vbtn: Fix return value check in check_acpi_dev()

drivers/platform/x86/intel-hid.c | 2 +-
drivers/platform/x86/intel-vbtn.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

--
2.7.4


2020-07-10 20:40:59

by Andy Shevchenko

[permalink] [raw]
Subject: Re: [PATCH v3 0/2] Fix return value check

On Fri, Jul 10, 2020 at 12:28 PM Lu Wei <[email protected]> wrote:
>
> In the function check_acpi_dev(), if it fails to create
> platform device, the return value is ERR_PTR() or NULL.
> Thus it must use IS_ERR_OR_NULL to check return value.
>

Pushed to my review and testing queue, thanks!

> ---
> v2->v3
> - Modify format
> v3->v4
> - Change commit number to 12 characters
>
> Lu Wei (2):
> intel-hid: Fix return value check in check_acpi_dev()
> intel-vbtn: Fix return value check in check_acpi_dev()
>
> drivers/platform/x86/intel-hid.c | 2 +-
> drivers/platform/x86/intel-vbtn.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> --
> 2.7.4
>


--
With Best Regards,
Andy Shevchenko