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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e8d9c560-dfd4-8419-a768-6a832114e7ea@kernel.org>
Date:   Mon, 2 Nov 2020 09:20:34 +0100
From:   Jiri Slaby <jirislaby@...nel.org>
To:     YueHaibing <yuehaibing@...wei.com>, gregkh@...uxfoundation.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] serial: mctrl_gpio: Fix passing zero to 'ERR_PTR' warning

On 31. 10. 20, 4:05, YueHaibing wrote:
> drivers/tty/serial/serial_mctrl_gpio.c:214
>   mctrl_gpio_init() warn: passing zero to 'ERR_PTR'
> 
> gpiod_to_irq() never return 0, so remove the useless test
> and make code more clear.
> 
> Signed-off-by: YueHaibing <yuehaibing@...wei.com>

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>

> ---
>   drivers/tty/serial/serial_mctrl_gpio.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/serial_mctrl_gpio.c b/drivers/tty/serial/serial_mctrl_gpio.c
> index fb4781292d40..c41d8911ce95 100644
> --- a/drivers/tty/serial/serial_mctrl_gpio.c
> +++ b/drivers/tty/serial/serial_mctrl_gpio.c
> @@ -207,7 +207,7 @@ struct mctrl_gpios *mctrl_gpio_init(struct uart_port *port, unsigned int idx)
>   			continue;
>   
>   		ret = gpiod_to_irq(gpios->gpio[i]);
> -		if (ret <= 0) {
> +		if (ret < 0) {
>   			dev_err(port->dev,
>   				"failed to find corresponding irq for %s (idx=%d, err=%d)\n",
>   				mctrl_gpios_desc[i].name, idx, ret);
> 


-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ