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]
Message-ID: <72c81157-4bd1-6a3e-2415-92a2fb29ab6d@kernel.org>
Date:   Mon, 11 Jan 2021 10:58:12 +0100
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Erwan Le Ray <erwan.leray@...s.st.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Rob Herring <robh+dt@...nel.org>,
        Maxime Coquelin <mcoquelin.stm32@...il.com>,
        Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc:     linux-serial@...r.kernel.org, devicetree@...r.kernel.org,
        linux-stm32@...md-mailman.stormreply.com,
        linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org,
        Fabrice Gasnier <fabrice.gasnier@...s.st.com>,
        Valentin Caron <valentin.caron@...s.st.com>
Subject: Re: [PATCH v2 2/8] serial: stm32: fix code cleaning warnings and
 checks

On 06. 01. 21, 17:21, Erwan Le Ray wrote:
> --- a/drivers/tty/serial/stm32-usart.c
> +++ b/drivers/tty/serial/stm32-usart.c
...
> @@ -973,18 +971,17 @@ static int stm32_init_port(struct stm32_port *stm32port,
>   	struct resource *res;
>   	int ret;
>   
> +	ret = platform_get_irq(pdev, 0);
> +	if (ret <= 0)
> +		return ret ? : -ENODEV;
> +
>   	port->iotype	= UPIO_MEM;
>   	port->flags	= UPF_BOOT_AUTOCONF;
>   	port->ops	= &stm32_uart_ops;
>   	port->dev	= &pdev->dev;
>   	port->fifosize	= stm32port->info->cfg.fifosize;
>   	port->has_sysrq = IS_ENABLED(CONFIG_SERIAL_STM32_CONSOLE);
> -
> -	ret = platform_get_irq(pdev, 0);
> -	if (ret <= 0)
> -		return ret ? : -ENODEV;
>   	port->irq = ret;

I would move this set from ret above too. Or introduce a new variable, 
e.g. "irq".

thanks,
-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ