Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp2823253pxb; Thu, 3 Feb 2022 15:36:09 -0800 (PST) X-Google-Smtp-Source: ABdhPJwo8A3Z7Tm0diJBx1XnjJM8wuEvIex7lwoMxm6ouvRPmjLcOUPHIrM8wiJp1HOdOmylJpcH X-Received: by 2002:a63:9044:: with SMTP id a65mr321530pge.325.1643931369070; Thu, 03 Feb 2022 15:36:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643931369; cv=none; d=google.com; s=arc-20160816; b=O+jMNYyxqGytzJLlo6MJcu4F0mnSrqIz8uZEPHtWSOEQg9x2qDF2MkRlFqfwN18eQq C5wEyVcp4wXddEjyGrkfTJ5LCMs8hEphtWCb0WTMgBBRE8h1CGBrlrw6NTBNlaMMAuPc iEEsd9qkM/wzj4mKqaepaM/CMZb23JpWd9ig+f1v4baW2Nh4Dho7cjEd39hsfPfs8Si5 WVTkdKt4T9BrnrzwlocftjIvoTi5wP8BBal1WyZGBc3GNZ6MC408SHwyX107vSuADR5/ mCG/CWK9zv5DwXmPoyeXm59TXUX5s3at9M1PNChHBSVxU9r35SV6dBea/jJQaU2SbK6a B3rg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:user-agent:mime-version:date :message-id:dkim-signature; bh=Rz47yo2CsOvSbBUqTAu/MeC9oxThZqNB7BiBBAeBZfE=; b=YRkbT1yCMkqMPvOWxEwyCjgIPSw1fjGA3ljvI61LbniOh7kUiNXc8IT4o3ypGdIzeS SzTYOwUveJwkhRRcjUIdJINcstwI5yaW/VkmvSzsQAEROaD3PfFFrolM2Bj/OXCBa7GJ 5AdhhtXRZV/XnD7s0mhWj6Tm4RgevyazPOrQ124gb8/0lEw2nRXwubJotnIIAcWbFUew VIguxccLczgk4qFOkEAR3pUdDVigvumLp7XRIXkrzMPTyBWV7IweYR3ddqH1Ify81V9/ veAYbi86peSmWt/ORvETCU25MWF1Hb8Zt+BLGv+CsxLQMEFFGrB9JSScV9ZgVndYF1Jz SHIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Jvsv4wGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m9si196765pls.466.2022.02.03.15.35.57; Thu, 03 Feb 2022 15:36:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Jvsv4wGb; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346896AbiBBTUO (ORCPT + 99 others); Wed, 2 Feb 2022 14:20:14 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:41010 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229676AbiBBTUN (ORCPT ); Wed, 2 Feb 2022 14:20:13 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 212JK4ND120200; Wed, 2 Feb 2022 13:20:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1643829604; bh=Rz47yo2CsOvSbBUqTAu/MeC9oxThZqNB7BiBBAeBZfE=; h=Date:Subject:To:References:From:In-Reply-To; b=Jvsv4wGbs+1GgJLy+NpYwrQ/IYEXLFSOPYPkeyDB+J7J0MjUYxlevRtwlCv5QRAAc zRdL3Rt2Ec1QaTAnv1QA17X9Yk/slfIjkHxoYFOYYTNrS+1X/Sr4ISnLR4A3BZkbF8 tWOWEYzO94ll3CgtsK0JUTyE5F6Cry7WPyeYUD3Q= Received: from DLEE100.ent.ti.com (dlee100.ent.ti.com [157.170.170.30]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 212JK4Le130248 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 2 Feb 2022 13:20:04 -0600 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE100.ent.ti.com (157.170.170.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14; Wed, 2 Feb 2022 13:20:03 -0600 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2308.14 via Frontend Transport; Wed, 2 Feb 2022 13:20:03 -0600 Received: from [128.247.81.242] (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 212JK33r043456; Wed, 2 Feb 2022 13:20:03 -0600 Message-ID: <9848466d-6307-8f74-87b6-e3f050651c8d@ti.com> Date: Wed, 2 Feb 2022 13:20:02 -0600 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.5.0 Subject: Re: [PATCH] soc: ti: wkup_m3_ipc: Fix IRQ check in wkup_m3_ipc_probe Content-Language: en-US To: Miaoqian Lin , Nishanth Menon , Santosh Shilimkar , Tony Lindgren , , References: <20220114062840.16620-1-linmq006@gmail.com> From: Dave Gerlach In-Reply-To: <20220114062840.16620-1-linmq006@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On 1/14/22 00:28, Miaoqian Lin wrote: > platform_get_irq() returns negative error number instead 0 on failure. > And the doc of platform_get_irq() provides a usage example: > > int irq = platform_get_irq(pdev, 0); > if (irq < 0) > return irq; > > Fix the check of return value to catch errors correctly. > Looks good to me. Acked-by: Dave Gerlach > Fixes: cdd5de500b2c ("soc: ti: Add wkup_m3_ipc driver") > Signed-off-by: Miaoqian Lin > --- > drivers/soc/ti/wkup_m3_ipc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/soc/ti/wkup_m3_ipc.c b/drivers/soc/ti/wkup_m3_ipc.c > index 72386bd393fe..2f03ced0f411 100644 > --- a/drivers/soc/ti/wkup_m3_ipc.c > +++ b/drivers/soc/ti/wkup_m3_ipc.c > @@ -450,9 +450,9 @@ static int wkup_m3_ipc_probe(struct platform_device *pdev) > return PTR_ERR(m3_ipc->ipc_mem_base); > > irq = platform_get_irq(pdev, 0); > - if (!irq) { > + if (irq < 0) { > dev_err(&pdev->dev, "no irq resource\n"); > - return -ENXIO; > + return irq; > } > > ret = devm_request_irq(dev, irq, wkup_m3_txev_handler,