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>] [day] [month] [year] [list]
Message-Id: <20220825012402.10259-1-yuzhe@nfschina.com>
Date:   Thu, 25 Aug 2022 09:24:02 +0800
From:   Yu Zhe <yuzhe@...china.com>
To:     daniel@...que.org, haojian.zhuang@...il.com,
        robert.jarzmik@...e.fr, perex@...ex.cz, tiwai@...e.com
Cc:     linux-arm-kernel@...ts.infradead.org, alsa-devel@...a-project.org,
        linux-kernel@...r.kernel.org, liqiong@...china.com,
        Yu Zhe <yuzhe@...china.com>
Subject: [PATCH] ARM: pxa: pxa2xx-ac97-lib: fix tests for platform_get_irq() failure

The platform_get_irq() returns negative error codes.  It can't actually
return zero.

Signed-off-by: Yu Zhe <yuzhe@...china.com>
---
 sound/arm/pxa2xx-ac97-lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/arm/pxa2xx-ac97-lib.c b/sound/arm/pxa2xx-ac97-lib.c
index e55c0421718b..1f4c4749a6fb 100644
--- a/sound/arm/pxa2xx-ac97-lib.c
+++ b/sound/arm/pxa2xx-ac97-lib.c
@@ -402,7 +402,7 @@ int pxa2xx_ac97_hw_probe(struct platform_device *dev)
 		goto err_clk2;
 
 	irq = platform_get_irq(dev, 0);
-	if (!irq)
+	if (irq < 0)
 		goto err_irq;
 
 	ret = request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL);
-- 
2.11.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ