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] [thread-next>] [day] [month] [year] [list]
Message-ID: <8db6ca9c-6ceb-001e-3427-c7e320111d80@kernel.org>
Date:   Wed, 28 Sep 2022 09:49:58 +0300
From:   Roger Quadros <rogerq@...nel.org>
To:     Dongliang Mu <dzm91@...t.edu.cn>,
        Peter Chen <peter.chen@...nel.org>,
        Pawel Laszczak <pawell@...ence.com>,
        Aswath Govindraju <a-govindraju@...com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     Dongliang Mu <mudongliangabcd@...il.com>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: cdns3: remove dead code



On 26/09/2022 16:59, Dongliang Mu wrote:
> From: Dongliang Mu <mudongliangabcd@...il.com>
> 
> Smatch reports the following error:
> 
> drivers/usb/cdns3/cdns3-plat.c:113 cdns3_plat_probe() warn:
> platform_get_irq() does not return zero
> 
> From the document, platform_get_irq_byname_optional only returns
> non-zero value, and negative value on failure.
> 
> Fix this by removing the zero value checking.
> 
> Signed-off-by: Dongliang Mu <mudongliangabcd@...il.com>

Reviewed-by: Roger Quadros <rogerq@...nel.org>

> ---
>  drivers/usb/cdns3/cdns3-plat.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/usb/cdns3/cdns3-plat.c b/drivers/usb/cdns3/cdns3-plat.c
> index dc068e940ed5..2bc5d094548b 100644
> --- a/drivers/usb/cdns3/cdns3-plat.c
> +++ b/drivers/usb/cdns3/cdns3-plat.c
> @@ -110,8 +110,6 @@ static int cdns3_plat_probe(struct platform_device *pdev)
>  	cdns->wakeup_irq = platform_get_irq_byname_optional(pdev, "wakeup");
>  	if (cdns->wakeup_irq == -EPROBE_DEFER)
>  		return cdns->wakeup_irq;
> -	else if (cdns->wakeup_irq == 0)
> -		return -EINVAL;
>  
>  	if (cdns->wakeup_irq < 0) {
>  		dev_dbg(dev, "couldn't get wakeup irq\n");


cheers,
-roger

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ