Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp5059367imm; Tue, 18 Sep 2018 03:46:56 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZw+b2mEAwgOJgHBh6JsIcS7Pml0/37Ex/5BKTbN4jg4RXaCF3cOFLV9Qpiou5frQu6Q8va X-Received: by 2002:a62:cdcf:: with SMTP id o198-v6mr30427610pfg.12.1537267615967; Tue, 18 Sep 2018 03:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537267615; cv=none; d=google.com; s=arc-20160816; b=KBn//8o2/xnmja5pY2lH6aAoc8UnyG6H4Czdjk23LwMJ9TVFgUDgpM/GYZ/hNBn6mc FC6AL2I1BdfZOJJ3AZ5wjPi9Z+MKT8+s7ZPlgSGFKcOS951K9yutnvWO3poqpXnIiolA 4PSXJHFOoNLzBheB7CBEdRU8EfvEtfsxhYDYMJnCmMnGlTAbeDH7h2zjHtxSfdvseO6I Tb8XNp8nKas0mOzG1bZR4AjHUxdo9XPP85mQze4ESLZk5kd74AwY1JV5NIg2IFcPJUpU 4WXJpDaRDn35AYnIFJoDkPuDyzFwZ+SpFvEHf2uMDSQ7uQjm6WB6yotdvLvektu8VPBu FZtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=olGHbz5sh+sCp2Ir2BWQH9jppL2fEW8i2tC7+tk9WK0=; b=Ov2U4b/228SLfndbExafz+6l0n5F2DYTLUx9KFG5japv6r5GIBq3L2to6Ru22EhVw4 nrXcGC7ifROVC9xrYesZ50PIhILBV1mLYXmTXbQTSfkqxHHDeNuScxynwZuCY8u2G0Fn ZxITkMDHO+ymK6WKNngnjUGEsYKk0DMn+2XGnK021c4iJ0WUr/fD3IB/cubFJ0E+N9mD gBa+R4nLnDjGG9LmVlp83ndrL1KxAKrQg4COHl5wG2N0yvuOtuu4r2YEfod250CeuUBU 3E1H/5pZVVADL1OvtkjnRXnYiJSj2cWP2BswqnAZIwmtrjPwMUNgLrqQajtP+6yHXdOo XUYw== 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 s195-v6si18065623pgs.492.2018.09.18.03.46.39; Tue, 18 Sep 2018 03:46:55 -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 S1729125AbeIRQSe (ORCPT + 99 others); Tue, 18 Sep 2018 12:18:34 -0400 Received: from usa-sjc-mx-foss1.foss.arm.com ([217.140.101.70]:42214 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727667AbeIRQSe (ORCPT ); Tue, 18 Sep 2018 12:18:34 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 5ED59ED1; Tue, 18 Sep 2018 03:46:33 -0700 (PDT) Received: from e107981-ln.cambridge.arm.com (e107981-ln.Emea.Arm.com [10.4.13.117]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 2C44B3F5BD; Tue, 18 Sep 2018 03:46:32 -0700 (PDT) Date: Tue, 18 Sep 2018 11:46:29 +0100 From: Lorenzo Pieralisi To: "Gustavo A. R. Silva" Cc: Ryder Lee , Bjorn Helgaas , linux-pci@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] PCI: mediatek: Fix unchecked return value Message-ID: <20180918104629.GC26886@e107981-ln.cambridge.arm.com> References: <20180720150158.GA10922@embeddedor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180720150158.GA10922@embeddedor.com> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jul 20, 2018 at 10:01:58AM -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(-) Applied to pci/mediatek for v4.20, thanks. Lorenzo > 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; > } > -- > 2.7.4 >