Commit 29afbe5f authored by Dongliang Mu's avatar Dongliang Mu Committed by Greg Kroah-Hartman
Browse files

usb: cdns3: remove dead code



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: default avatarDongliang Mu <mudongliangabcd@gmail.com>
Link: https://lore.kernel.org/r/20220926135922.24541-1-dzm91@hust.edu.cn


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 1abf6ab4
Loading
Loading
Loading
Loading
+0 −2
Original line number Original line Diff line number Diff line
@@ -110,8 +110,6 @@ static int cdns3_plat_probe(struct platform_device *pdev)
	cdns->wakeup_irq = platform_get_irq_byname_optional(pdev, "wakeup");
	cdns->wakeup_irq = platform_get_irq_byname_optional(pdev, "wakeup");
	if (cdns->wakeup_irq == -EPROBE_DEFER)
	if (cdns->wakeup_irq == -EPROBE_DEFER)
		return cdns->wakeup_irq;
		return cdns->wakeup_irq;
	else if (cdns->wakeup_irq == 0)
		return -EINVAL;


	if (cdns->wakeup_irq < 0) {
	if (cdns->wakeup_irq < 0) {
		dev_dbg(dev, "couldn't get wakeup irq\n");
		dev_dbg(dev, "couldn't get wakeup irq\n");