From nobody Tue Apr 7 19:54:15 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 13984C04AA5 for ; Thu, 25 Aug 2022 01:10:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231689AbiHYBKI (ORCPT ); Wed, 24 Aug 2022 21:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46032 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiHYBKF (ORCPT ); Wed, 24 Aug 2022 21:10:05 -0400 Received: from mail.nfschina.com (unknown [IPv6:2400:dd01:100f:2:72e2:84ff:fe10:5f45]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DDFF418E33 for ; Wed, 24 Aug 2022 18:10:02 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 1DC031E80C8D; Thu, 25 Aug 2022 09:05:59 +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 bLJ48fhL0aT2; Thu, 25 Aug 2022 09:05:56 +0800 (CST) Received: from localhost.localdomain (unknown [180.167.10.98]) (Authenticated sender: yuzhe@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id BE5EE1E80C99; Thu, 25 Aug 2022 09:05:55 +0800 (CST) From: Yu Zhe To: lee@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, liqiong@nfschina.com, Yu Zhe Subject: [PATCH] mfd: fix tests for platform_get_irq() failure Date: Thu, 25 Aug 2022 09:09:11 +0800 Message-Id: <20220825010911.5324-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 --- drivers/mfd/fsl-imx25-tsadc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mfd/fsl-imx25-tsadc.c b/drivers/mfd/fsl-imx25-tsadc.c index 37e5e02a1d05..8ccdfd73e694 100644 --- a/drivers/mfd/fsl-imx25-tsadc.c +++ b/drivers/mfd/fsl-imx25-tsadc.c @@ -179,7 +179,7 @@ static int mx25_tsadc_remove(struct platform_device *pd= ev) struct mx25_tsadc *tsadc =3D platform_get_drvdata(pdev); int irq =3D platform_get_irq(pdev, 0); =20 - if (irq) { + if (irq > 0) { irq_set_chained_handler_and_data(irq, NULL, NULL); irq_domain_remove(tsadc->domain); } --=20 2.11.0