Message ID | 1622626610-58140-1-git-send-email-guohanjun@huawei.com (mailing list archive) |
---|---|
State | Mainlined, archived |
Headers | show |
Series | [1/2] ACPI: bus: Remove the not needed NULL set | expand |
On Wed, Jun 2, 2021 at 11:47 AM Hanjun Guo <guohanjun@huawei.com> wrote: > > 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) { > -- Applied as 5.14 material along with the [2/2[ with some edits in the subject and changelog, thanks!
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) {
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(-)