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] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 30 Nov 2021 11:46:19 +0200
From:   Andy Shevchenko <andy.shevchenko@...il.com>
To:     Tang Bin <tangbin@...s.chinamobile.com>
Cc:     Mark Brown <broonie@...nel.org>,
        Cezary Rojewski <cezary.rojewski@...el.com>,
        Pierre-Louis Bossart <pierre-louis.bossart@...ux.intel.com>,
        Liam Girdwood <liam.r.girdwood@...ux.intel.com>,
        Jie Yang <yang.jie@...ux.intel.com>,
        Jaroslav Kysela <perex@...ex.cz>,
        Takashi Iwai <tiwai@...e.com>,
        ALSA Development Mailing List <alsa-devel@...a-project.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] ASoC: Intel: atom: Remove redundant check to simplify the code

On Fri, Nov 26, 2021 at 2:37 PM Tang Bin <tangbin@...s.chinamobile.com> wrote:
>
> In the function sst_platform_get_resources(), if platform_get_irq()
> failed, the return should not be zero, as the example in
> platform.c is
>   * int irq = platform_get_irq(pdev, 0)
>   * if (irq < 0)
>   * return irq;
> So remove the redundant check to simplify the code.

FWIW,
Acked-by: Andy Shevchenko <andy.shevchenko@...il.com>

Code is correct, I haven't checked the rest, though.

> Signed-off-by: Tang Bin <tangbin@...s.chinamobile.com>
> ---
>  sound/soc/intel/atom/sst/sst_acpi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/intel/atom/sst/sst_acpi.c b/sound/soc/intel/atom/sst/sst_acpi.c
> index 3be64430c..696d547c5 100644
> --- a/sound/soc/intel/atom/sst/sst_acpi.c
> +++ b/sound/soc/intel/atom/sst/sst_acpi.c
> @@ -226,8 +226,8 @@ static int sst_platform_get_resources(struct intel_sst_drv *ctx)
>         /* Find the IRQ */
>         ctx->irq_num = platform_get_irq(pdev,
>                                 ctx->pdata->res_info->acpi_ipc_irq_index);
> -       if (ctx->irq_num <= 0)
> -               return ctx->irq_num < 0 ? ctx->irq_num : -EIO;
> +       if (ctx->irq_num < 0)
> +               return ctx->irq_num;
>
>         return 0;
>  }
> --
> 2.20.1.windows.1
>
>
>


-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ