Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3547824imm; Wed, 5 Sep 2018 01:52:07 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZIk3VDJZUTIaGQ5AFbP8ddbWrIIGVNOJ9Z31HqnpJ/uP287OIr9O8BfFjhEoTs/HziG4DO X-Received: by 2002:a63:a441:: with SMTP id c1-v6mr35721337pgp.182.1536137527524; Wed, 05 Sep 2018 01:52:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536137527; cv=none; d=google.com; s=arc-20160816; b=nr2a1PNtyPTso9AaUTl5frkj4qk/JA7xKNp/+YaxE6HEYokGXNxRF7sGvHAxKp5VBI Ub6usJaNyPrpawz9me/1FVzaPFbogArlXTsbpoY0IMEQDXpPPPEYFTzqbNvEAam+RcSa WlSfjNk4VJE0FDkquCY8hCg5ETF5EndPPBe4gCbcpn9QaotzPJNZPebmeGBs8GrlB2Y5 vgO4oiqXdCbQOCqWViga558sYIfw/CDIFi2+W1PXDOZZxsOirP4UvjMx30EaezT3blyw eFD6xoS/VNNeLGUp9TyZyPZuDwcgx7jGMvn0amv1I1UszdWLkPHchwc7gCHKOKEQxp2F 763A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id; bh=6sib8AKCCeUfPvuNsjnchiF+fYwMkRWS5buc8L25T5s=; b=oOar+bB5qwV/LnEdGI6OwB353bVITKl38KW5apnAZZ29o/X18iwF2CSEiuJGqv6Rtf KuyX3GsdjF9njoPWw2C8PVDJt01I8rqoP4geHNVQKWs3zAx+6rrEO12OueI4+Q/YmLKU u4XoGT+0OiWQy5UHSytOkSha1YWyeDzgfrjiNNL6dI+r83AEz6Twk9Jf4CGMdfYazybn HcPKo/1hPuKZY07IT11OTftzdkbMp6TKb8YDM39k898LVdXPulD1iYSZf8cmP7DeDPUS H8Yi1RmrnHPNIVamCbed5UpJSQ4Q0tTYACkDYLzJOS7W2iZG3pEunTas07zOENhyTedD SWoA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f35-v6si1337776plh.291.2018.09.05.01.51.52; Wed, 05 Sep 2018 01:52:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727991AbeIENTx (ORCPT + 99 others); Wed, 5 Sep 2018 09:19:53 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:65511 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726401AbeIENTx (ORCPT ); Wed, 5 Sep 2018 09:19:53 -0400 X-UUID: 70f6b2a713e54af287959e973471d185-20180905 Received: from mtkexhb01.mediatek.inc [(172.21.101.102)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 1548811753; Wed, 05 Sep 2018 16:50:37 +0800 Received: from MTKCAS32.mediatek.inc (172.27.4.184) by mtkmbs08n2.mediatek.inc (172.21.101.56) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 5 Sep 2018 16:50:34 +0800 Received: from [10.17.3.153] (10.17.3.153) by MTKCAS32.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 5 Sep 2018 16:50:33 +0800 Message-ID: <1536137433.31406.17.camel@mhfsdcap03> Subject: Re: [PATCH] PCI: mediatek: Fix unchecked return value From: Honghui Zhang To: "Gustavo A. R. Silva" CC: Ryder Lee , Lorenzo Pieralisi , Bjorn Helgaas , , , Date: Wed, 5 Sep 2018 16:50:33 +0800 In-Reply-To: <20180720150158.GA10922@embeddedor.com> References: <20180720150158.GA10922@embeddedor.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2018-07-20 at 10:01 -0500, Gustavo A. R. Silva wrote: > Check return value of devm_pci_remap_iospace. > > Notice that, currently, all instances of devm_pci_remap_iospace > are being checked. > > Addresses-Coverity-ID: 1471965 ("Unchecked return value") > Signed-off-by: Gustavo A. R. Silva > --- > drivers/pci/controller/pcie-mediatek.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Hi, Gustavo, thanks for your help. Acked-by: Honghui Zhang > diff --git a/drivers/pci/controller/pcie-mediatek.c b/drivers/pci/controller/pcie-mediatek.c > index 861dda6..1477939 100644 > --- a/drivers/pci/controller/pcie-mediatek.c > +++ b/drivers/pci/controller/pcie-mediatek.c > @@ -1109,7 +1109,9 @@ static int mtk_pcie_request_resources(struct mtk_pcie *pcie) > if (err < 0) > return err; > > - devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start); > + err = devm_pci_remap_iospace(dev, &pcie->pio, pcie->io.start); > + if (err) > + return err; > > return 0; > }