lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJZ5v0jRPmq--RRNHLNR+b+MfrefXexBdTXEuZitg0-VbB6omA@mail.gmail.com>
Date:   Sat, 3 Sep 2022 20:54:36 +0200
From:   "Rafael J. Wysocki" <rafael@...nel.org>
To:     Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Cc:     ACPI Devel Maling List <linux-acpi@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        "Rafael J. Wysocki" <rafael@...nel.org>,
        Len Brown <lenb@...nel.org>
Subject: Re: [PATCH v2 1/4] ACPI: platform: Get rid of redundant 'else'

On Wed, Aug 31, 2022 at 4:03 PM Andy Shevchenko
<andriy.shevchenko@...ux.intel.com> wrote:
>
> In the snippets like the following
>
>         if (...)
>                 return / goto / break / continue ...;
>         else
>                 ...
>
> the 'else' is redundant. Get rid of it.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> v2: no changes
>  drivers/acpi/acpi_platform.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/acpi/acpi_platform.c b/drivers/acpi/acpi_platform.c
> index 1a1c78b23fba..75e26528056d 100644
> --- a/drivers/acpi/acpi_platform.c
> +++ b/drivers/acpi/acpi_platform.c
> @@ -114,9 +114,9 @@ struct platform_device *acpi_create_platform_device(struct acpi_device *adev,
>
>         INIT_LIST_HEAD(&resource_list);
>         count = acpi_dev_get_resources(adev, &resource_list, NULL, NULL);
> -       if (count < 0) {
> +       if (count < 0)
>                 return NULL;
> -       } else if (count > 0) {
> +       if (count > 0) {
>                 resources = kcalloc(count, sizeof(struct resource),
>                                     GFP_KERNEL);
>                 if (!resources) {
> --

Whole series applied as 6.1 material, thanks!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ