Re: [PATCH linux-next] ACPI: bus: Remove the unneeded result variable

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

 



On Wed, Aug 24, 2022 at 9:53 AM <cgel.zte@xxxxxxxxx> wrote:
>
> From: ye xingchen <ye.xingchen@xxxxxxxxxx>
>
> Return the value from driver_register() directly instead of storing it
>  in another redundant variable.
>
> Reported-by: Zeal Robot <zealci@xxxxxxxxxx>
> Signed-off-by: ye xingchen <ye.xingchen@xxxxxxxxxx>
> ---
>  drivers/acpi/bus.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/drivers/acpi/bus.c b/drivers/acpi/bus.c
> index c0d20d997891..661a63ea3248 100644
> --- a/drivers/acpi/bus.c
> +++ b/drivers/acpi/bus.c
> @@ -973,16 +973,13 @@ EXPORT_SYMBOL_GPL(acpi_driver_match_device);
>   */
>  int acpi_bus_register_driver(struct acpi_driver *driver)
>  {
> -       int ret;
> -
>         if (acpi_disabled)
>                 return -ENODEV;
>         driver->drv.name = driver->name;
>         driver->drv.bus = &acpi_bus_type;
>         driver->drv.owner = driver->owner;
>
> -       ret = driver_register(&driver->drv);
> -       return ret;
> +       return driver_register(&driver->drv);
>  }
>
>  EXPORT_SYMBOL(acpi_bus_register_driver);
> --

Applied as 6.1 material, 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