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: <20220422160931.6a4eca42@kernel.org>
Date:   Fri, 22 Apr 2022 16:09:31 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     cgel.zte@...il.com
Cc:     krzysztof.kozlowski@...aro.org, davem@...emloft.net,
        lv.ruyi@....com.cn, yashsri421@...il.com, sameo@...ux.intel.com,
        cuissard@...vell.com, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Zeal Robot <zealci@....com.cn>
Subject: Re: [PATCH] NFC: nfcmrvl: fix error check return value of
 irq_of_parse_and_map()

On Fri, 22 Apr 2022 08:46:05 +0000 cgel.zte@...il.com wrote:
> diff --git a/drivers/nfc/nfcmrvl/i2c.c b/drivers/nfc/nfcmrvl/i2c.c
> index ceef81d93ac9..7dcc97707363 100644
> --- a/drivers/nfc/nfcmrvl/i2c.c
> +++ b/drivers/nfc/nfcmrvl/i2c.c
> @@ -167,7 +167,7 @@ static int nfcmrvl_i2c_parse_dt(struct device_node *node,
>  		pdata->irq_polarity = IRQF_TRIGGER_RISING;
>  
>  	ret = irq_of_parse_and_map(node, 0);
> -	if (ret < 0) {
> +	if (!ret) {
>  		pr_err("Unable to get irq, error: %d\n", ret);
>  		return ret;

If ret is guaranteed to be 0 in this branch now, why print it, 
and how is it okay to return it from this function on error?

The usual low quality patch from the CGEL team :/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ