Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp851878pxp; Wed, 16 Mar 2022 19:04:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUfTVXYYMjLU8Y40yEWq3eYKcfBVg+CqVaN/wStru0FqQXodxTpcOFv8YPhrQu5hVCAcC6 X-Received: by 2002:aa7:d945:0:b0:418:f041:f9bc with SMTP id l5-20020aa7d945000000b00418f041f9bcmr2120652eds.305.1647482668502; Wed, 16 Mar 2022 19:04:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647482668; cv=none; d=google.com; s=arc-20160816; b=UDOtdbc6MyzGgCQ3p/1ey637RhnDM5dOwGpTXooMOflCVXyQXrxhkb4eFfGsuHpGV1 TS8puLN+rr5k3CIMpADmwDjYpfdTMaC5f4GHrQu6/ooeSm/y/24Kb0A7yiAtM4Tekwiv I2cDelLKM21oY9GjRqbH3kfPaPD0dtqjMH8PVPoxEGmbUSRBBKSimyxmKMO2rIKun+2t 2d5B4HVQE8cmSdlzJSjLHBK3GgcQnpBOb+NauiSPaL8JDe90CcjWtbLGJr8AN0d1LWqd 1GOBZyr8avUEqPuup5HdH1Chj5Jp6HVolXrE1o0Z1k01u5/e3YtFmi+jqEq7EQxsc8uz GrWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=F+9Lk/ZaOrFy64xMvd6xSLhdg3ceUuM8DcyhbPt/GUM=; b=BGw4QFj+3qIil83uycYnqr9WWpYOnEKHcRk+oVYAWb9WIbTQW14OpogCNL/LujMYm+ hw9IsXViPrGf4HOmf9zLzKyBqWa8FkIVIlieUwbYasgZVwNcyriF3AhrbLnWa0bw1oo1 xGyhqWo6+tkjyeIRm0UhB/WfN+Zw1TThze6U3hX4YJ4wklhl7G+xmJSsxafUX3wtV2/z Eh71RfMgWwFEloAog3QCySwFUxPYfC1JZk7Ukw4pZHlbM9ctz9SKq56LherQ1ifCjIR4 crkhcOfYDzJeZf0O3Vd4gdBFmPaA/tMJkIQZ03Nnsw8wj9InXpKfuDE46uiVxAVannXx TTrw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=t32YKnrP; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hs19-20020a1709073e9300b006da8440e213si2698934ejc.67.2022.03.16.19.04.03; Wed, 16 Mar 2022 19:04:28 -0700 (PDT) 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=@linaro.org header.s=google header.b=t32YKnrP; 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=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1351381AbiCPCuG (ORCPT + 99 others); Tue, 15 Mar 2022 22:50:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48884 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230462AbiCPCuE (ORCPT ); Tue, 15 Mar 2022 22:50:04 -0400 Received: from mail-pj1-x1035.google.com (mail-pj1-x1035.google.com [IPv6:2607:f8b0:4864:20::1035]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8AB36BF65 for ; Tue, 15 Mar 2022 19:48:50 -0700 (PDT) Received: by mail-pj1-x1035.google.com with SMTP id mr24-20020a17090b239800b001bf0a375440so3855166pjb.4 for ; Tue, 15 Mar 2022 19:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=F+9Lk/ZaOrFy64xMvd6xSLhdg3ceUuM8DcyhbPt/GUM=; b=t32YKnrPGUxZ5shZ99fWStzfMUkFlC1Lj9TCief1G7+4rubHcPZCBW99KdgQrIoNB6 atAh1RryHo5uqi5Gx3OY5qF014LUWmMiEIwgWtAwocyP0sU/Mg8x0GVnZypuPgsNkqpp Zz6eOomO9XKNL88zcrqmCS1AeIENLF3YgGcEzNgqGs9mzR9VmjtCtvPzo7t4/vFZm5HD Tm8VI3wqWOatHyzn4bhprFp4M7kFjkUbav8yO8TOREOEP7MLAsCte5twThcAn3HBNQ5Y pbqYBjWbVRb+js8vPRpr3JxHDbRWvosFQbQuDpaE5s3sc2oOkWtC12PwgWQi0RnKFH8O Yl6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=F+9Lk/ZaOrFy64xMvd6xSLhdg3ceUuM8DcyhbPt/GUM=; b=cAo42W3cvm6aFqRAQ7pmJTFhbhDvNqy9VjjH3YCliuFlU2mIkhQdVoDQcRm1ZCDkFr ZTBUdcVfAZMqSOHfkw9+ZXSs+oiNWf9uBXnCLL5EXDKguIgivjhHuZ1Hhxijn7ERnseG AgVEl49CUQT8dU5t9VDmJoTrT73b7bPmyPHKD6fGdJLVPk45gHicEpWWUIWA8mt0e5Om TMDVpZKxAmvbEWS3sPW8s4oupLu2T6VlvZeZPuqM/Vkbcj7ootzhcbs48Ic02aSjpmZa XZg3HSaJ/D8TJJKTY8Mri/SmqsjAfBovhjNVO0J3QFN1HHmf8qy8axGH65t+svXWa58v BUlQ== X-Gm-Message-State: AOAM531O5u1LMOdG7GwOZZNn6vZwyI1LtsKXHtqvoOnAN/wacRRdTvz7 pYRtHjLnszMx8+FRdRoOh/uNeA== X-Received: by 2002:a17:90b:4f92:b0:1bf:25e2:f6af with SMTP id qe18-20020a17090b4f9200b001bf25e2f6afmr7931464pjb.98.1647398929987; Tue, 15 Mar 2022 19:48:49 -0700 (PDT) Received: from dragon (80.251.214.228.16clouds.com. [80.251.214.228]) by smtp.gmail.com with ESMTPSA id j17-20020a634a51000000b00378f9c90e66sm616942pgl.39.2022.03.15.19.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Mar 2022 19:48:49 -0700 (PDT) Date: Wed, 16 Mar 2022 10:48:44 +0800 From: Shawn Guo To: Yang Yingliang Cc: linux-kernel@vger.kernel.org, maz@kernel.org Subject: Re: [PATCH -next] irqchip/irq-qcom-mpm: fix return value check in qcom_mpm_init() Message-ID: <20220316024844.GA282154@dragon> References: <20220316025100.1758413-1-yangyingliang@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220316025100.1758413-1-yangyingliang@huawei.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 16, 2022 at 10:51:00AM +0800, Yang Yingliang wrote: > If devm_platform_ioremap_resource() fails, it never returns > NULL, replace NULL check with IS_ERR(). > > Fixes: a6199bb514d8 ("irqchip: Add Qualcomm MPM controller driver") > Reported-by: Hulk Robot > Signed-off-by: Yang Yingliang > --- > drivers/irqchip/irq-qcom-mpm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/irqchip/irq-qcom-mpm.c b/drivers/irqchip/irq-qcom-mpm.c > index eea5a753618c..d30614661eea 100644 > --- a/drivers/irqchip/irq-qcom-mpm.c > +++ b/drivers/irqchip/irq-qcom-mpm.c > @@ -375,7 +375,7 @@ static int qcom_mpm_init(struct device_node *np, struct device_node *parent) > raw_spin_lock_init(&priv->lock); > > priv->base = devm_platform_ioremap_resource(pdev, 0); > - if (!priv->base) > + if (IS_ERR(priv->base)) Oops! Thanks for the fixing! Acked-by: Shawn Guo > return PTR_ERR(priv->base); > > for (i = 0; i < priv->reg_stride; i++) { > -- > 2.25.1 >