ACPI: bus: Remove unneeded assignment
authorHanjun Guo <guohanjun@huawei.com>
Wed, 2 Jun 2021 09:36:49 +0000 (17:36 +0800)
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>
Mon, 7 Jun 2021 13:44:25 +0000 (15:44 +0200)
When acpi_kobj is NULL already, assigning NULL to it is redundant,
so don't do that.

Signed-off-by: Hanjun Guo <guohanjun@huawei.com>
[ rjw: Subject and changelog edits ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
drivers/acpi/bus.c

index be7da23..a2e814a 100644 (file)
@@ -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) {