From nobody Tue Apr 7 19:54:16 2026 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACE96C3F6B0 for ; Thu, 25 Aug 2022 01:25:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231816AbiHYBZD (ORCPT ); Wed, 24 Aug 2022 21:25:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39348 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229463AbiHYBZA (ORCPT ); Wed, 24 Aug 2022 21:25:00 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id C452533366 for ; Wed, 24 Aug 2022 18:24:58 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 05B451E80C99; Thu, 25 Aug 2022 09:20:55 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9CIsm4tv8qoT; Thu, 25 Aug 2022 09:20:52 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: yuzhe@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id BB6CD1E80C8D; Thu, 25 Aug 2022 09:20:51 +0800 (CST) From: Yu Zhe To: daniel@zonque.org, haojian.zhuang@gmail.com, robert.jarzmik@free.fr, perex@perex.cz, tiwai@suse.com Cc: linux-arm-kernel@lists.infradead.org, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, Yu Zhe Subject: [PATCH] ARM: pxa: pxa2xx-ac97-lib: fix tests for platform_get_irq() failure Date: Thu, 25 Aug 2022 09:24:02 +0800 Message-Id: <20220825012402.10259-1-yuzhe@nfschina.com> X-Mailer: git-send-email 2.11.0 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" The platform_get_irq() returns negative error codes. It can't actually return zero. Signed-off-by: Yu Zhe --- 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; =20 irq =3D platform_get_irq(dev, 0); - if (!irq) + if (irq < 0) goto err_irq; =20 ret =3D request_irq(irq, pxa2xx_ac97_irq, 0, "AC97", NULL); --=20 2.11.0