All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] ACPI: bus: Remove the not needed NULL set
@ 2021-06-02  9:36 Hanjun Guo
  2021-06-02  9:36 ` [PATCH 2/2] ACPI: bus: Call kobject_put() in error path for acpi_init() Hanjun Guo
  2021-06-07 13:46 ` [PATCH 1/2] ACPI: bus: Remove the not needed NULL set Rafael J. Wysocki
  0 siblings, 2 replies; 3+ messages in thread
From: Hanjun Guo @ 2021-06-02  9:36 UTC (permalink / raw)
  To: linux-acpi; +Cc: Rafael J. Wysocki, Hanjun Guo

Code running with if (!acpi_kobj) is true, acpi_kobj is NULL
as it is, no need to set to NULL.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
---
 drivers/acpi/bus.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
index 60787d9..f9b5262 100644
--- a/drivers/acpi/bus.c
+++ b/drivers/acpi/bus.c
@@ -1325,10 +1325,8 @@ static int __init acpi_init(void)
 	}
 
 	acpi_kobj = kobject_create_and_add("acpi", firmware_kobj);
-	if (!acpi_kobj) {
+	if (!acpi_kobj)
 		pr_debug("%s: kset create error\n", __func__);
-		acpi_kobj = NULL;
-	}
 
 	result = acpi_bus_init();
 	if (result) {
-- 
1.7.12.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-07 13:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-02  9:36 [PATCH 1/2] ACPI: bus: Remove the not needed NULL set Hanjun Guo
2021-06-02  9:36 ` [PATCH 2/2] ACPI: bus: Call kobject_put() in error path for acpi_init() Hanjun Guo
2021-06-07 13:46 ` [PATCH 1/2] ACPI: bus: Remove the not needed NULL set Rafael J. Wysocki

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.