Re: [PATCH 1/2] ACPI: bus: Remove the not needed NULL set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 2, 2021 at 11:47 AM Hanjun Guo <guohanjun@xxxxxxxxxx> 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@xxxxxxxxxx>
> ---
>  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!



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux