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: <eb34470f-c86e-4d80-a6a1-811d6cd452b9@kili.mountain>
Date:   Fri, 24 Mar 2023 09:20:02 +0300
From:   Dan Carpenter <error27@...il.com>
To:     Mingxuan Xiang <mx_xiang@...t.edu.cn>
Cc:     Thinh Nguyen <Thinh.Nguyen@...opsys.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        hust-os-kernel-patches@...glegroups.com,
        Dongliang Mu <dzm91@...t.edu.cn>, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v3] usb: dwc3: host: remove dead code in
 dwc3_host_get_irq()

On Fri, Mar 24, 2023 at 02:09:34PM +0800, Mingxuan Xiang wrote:
> According to the description of platform_get_irq()
>  * Return: non-zero IRQ number on success, 
>  			negative error number on failure.
> and the code, platform_get_irq() will return -EINVAL
> instead of IRQ0.
> 
> So platform_get_irq() no longer returns 0, there is no
> need to check whether the return value is 0.
> 
> Found by Smatch:
> drivers/usb/dwc3/host.c:60 dwc3_host_get_irq() 
> 	warn: platform_get_irq() does not return zero
> 
> Signed-off-by: Mingxuan Xiang <mx_xiang@...t.edu.cn>
> ---
> v2->v3: remove curly braces
> v1->v2: remove redundant goto
> Only compile tested.

Reviewed-by: Dan Carpenter <error27@...il.com>

regards,
dan carpenter

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ