* [PATCH v3 0/2] Fix return value check
@ 2020-07-10 9:04 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
*** BLURB HERE ***
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 0/2] Fix return value check
@ 2020-07-10 9:04 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
*** BLURB HERE ***
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
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH v3 1/2] intel-hid: Fix return value check in check_acpi_dev()
2020-07-10 9:04 ` Lu Wei
@ 2020-07-10 9:04 ` Lu Wei
-1 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: ecc83e52b28c ("intel-hid: new hid event driver for hotkeys")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
v2->v3
- Modify format
drivers/platform/x86/intel-hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index cc7dd4d..c45250c 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -564,7 +564,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-hid: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 1/2] intel-hid: Fix return value check in check_acpi_dev()
@ 2020-07-10 9:04 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: ecc83e52b28c ("intel-hid: new hid event driver for hotkeys")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
v2->v3
- Modify format
drivers/platform/x86/intel-hid.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-hid.c b/drivers/platform/x86/intel-hid.c
index cc7dd4d..c45250c 100644
--- a/drivers/platform/x86/intel-hid.c
+++ b/drivers/platform/x86/intel-hid.c
@@ -564,7 +564,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-hid: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] intel-vbtn: Fix return value check in check_acpi_dev()
2020-07-10 9:04 ` Lu Wei
@ 2020-07-10 9:04 ` Lu Wei
-1 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: 332e0812 ("intel-vbtn: new driver for Intel Virtual Button")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
v2->v3
- Modify format
drivers/platform/x86/intel-vbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index b588093..e1aa526 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -251,7 +251,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-vbtn: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] intel-vbtn: Fix return value check in check_acpi_dev()
@ 2020-07-10 9:04 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:04 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: 332e0812 ("intel-vbtn: new driver for Intel Virtual Button")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
v2->v3
- Modify format
drivers/platform/x86/intel-vbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index b588093..e1aa526 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -251,7 +251,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-vbtn: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] intel-vbtn: Fix return value check in check_acpi_dev()
2020-07-10 9:30 [PATCH v3 0/2] Fix return value check Lu Wei
@ 2020-07-10 9:30 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:30 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: 332e081225fc ("intel-vbtn: new driver for Intel Virtual Button")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
drivers/platform/x86/intel-vbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index b588093..e1aa526 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -251,7 +251,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-vbtn: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH v3 2/2] intel-vbtn: Fix return value check in check_acpi_dev()
@ 2020-07-10 9:30 ` Lu Wei
0 siblings, 0 replies; 8+ messages in thread
From: Lu Wei @ 2020-07-10 9:30 UTC (permalink / raw)
To: alex.hung, dvhart, andy, platform-driver-x86, linux-kernel,
acelan.kao, andy.shevchenko, luwei32
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.
Fixes: 332e081225fc ("intel-vbtn: new driver for Intel Virtual Button")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Lu Wei <luwei32@huawei.com>
---
drivers/platform/x86/intel-vbtn.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/platform/x86/intel-vbtn.c b/drivers/platform/x86/intel-vbtn.c
index b588093..e1aa526 100644
--- a/drivers/platform/x86/intel-vbtn.c
+++ b/drivers/platform/x86/intel-vbtn.c
@@ -251,7 +251,7 @@ check_acpi_dev(acpi_handle handle, u32 lvl, void *context, void **rv)
return AE_OK;
if (acpi_match_device_ids(dev, ids) == 0)
- if (acpi_create_platform_device(dev, NULL))
+ if (!IS_ERR_OR_NULL(acpi_create_platform_device(dev, NULL)))
dev_info(&dev->dev,
"intel-vbtn: created platform device\n");
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-10 9:30 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-10 9:04 [PATCH v3 0/2] Fix return value check Lu Wei
2020-07-10 9:04 ` Lu Wei
2020-07-10 9:04 ` [PATCH v3 1/2] intel-hid: Fix return value check in check_acpi_dev() Lu Wei
2020-07-10 9:04 ` Lu Wei
2020-07-10 9:04 ` [PATCH v3 2/2] intel-vbtn: " Lu Wei
2020-07-10 9:04 ` Lu Wei
2020-07-10 9:30 [PATCH v3 0/2] Fix return value check Lu Wei
2020-07-10 9:30 ` [PATCH v3 2/2] intel-vbtn: Fix return value check in check_acpi_dev() Lu Wei
2020-07-10 9:30 ` Lu Wei
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.