Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp4847865imm; Tue, 11 Sep 2018 19:40:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdaLXFbV04OwNk1cOYZdSkMKty2z99c2RZXMjqfmBVhM8f2OaVJ6mDUI503ofSMGzodAi6bb X-Received: by 2002:a62:e11:: with SMTP id w17-v6mr33111083pfi.242.1536720045610; Tue, 11 Sep 2018 19:40:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536720045; cv=none; d=google.com; s=arc-20160816; b=yT8VfttpezHvGhw/ZUVTRxgR4tYWxdbMLrzr3JNJq3Bjz9S0P2Mn5D1t1t55cRuTja V3KVBO1pXEY8j1RkgZVDpJJrFwTqs2A4D/iR3PR0rvfYLbaRphM8BY1CvgioR0eToiWQ XIlxnq4zaeBGR4JV+3GWbDWgPYUwOIVSGxlYXuMafG9y5Ln2I9DtLMwnB3xg7Dg2ojuH FrwK0LtK6HaGXaUMjIMJLb5LBSt+PpZjKN72v/spSih5lp2oJI0cV48rDUSL5wKHJEcy ZfT0ptrDXrGKO5VpbESBTEZJQLPU8teTKK4Ty2CX2LvYw8EwbasEvuf6zLspeCwdAGbR KVRg== 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 :message-id:date:subject:cc:to:from; bh=ApiYL2IUmNnyMFHcIOQh1dIPWMEHI2n+kd3RF4c+n50=; b=htgezXIuQ4StgpGvQ6jxuznu507KU41Qf+vWodP1G9klwrgnZ6xyetcqYA9zVChrw1 cJmSXUtFLUqJh/nDOlnC5kzkxpAduajt31bKUqkZtgWpE+gQIhTVDXWQiyhN7X7v0AVS ncuIJ7NDyIS+vJy3B0Pi0Q+5uWlFZ+flk8Z6YpMFn6JUPdJmZZsWcpb2GdKJ1LEV2s0r qXsYIyDUQ6sKK4wfEmzZPQZ7FOCb8APCo/R0ioGAljpAqbHOmFjDDDOwrNftixqTr3XE TQdY3KQbcs2f/dssOVU/3CE8kLR0c61zrUGQWtopI6haRFzSShpbmAr7wrmG743WuELK yLAQ== 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 e23-v6si20712822pgg.324.2018.09.11.19.40.30; Tue, 11 Sep 2018 19:40:45 -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 S1728150AbeILHm1 (ORCPT + 99 others); Wed, 12 Sep 2018 03:42:27 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:12099 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726686AbeILHm1 (ORCPT ); Wed, 12 Sep 2018 03:42:27 -0400 Received: from DGGEMS413-HUB.china.huawei.com (unknown [172.30.72.60]) by Forcepoint Email with ESMTP id B296B4090796A; Wed, 12 Sep 2018 10:40:11 +0800 (CST) Received: from localhost.localdomain.localdomain (10.175.113.25) by DGGEMS413-HUB.china.huawei.com (10.3.19.213) with Microsoft SMTP Server id 14.3.399.0; Wed, 12 Sep 2018 10:40:06 +0800 From: YueHaibing To: Greg Kroah-Hartman , , , , , , CC: YueHaibing , , , , , Subject: [PATCH -next] staging: mt7621-pci: Use PTR_ERR_OR_ZERO in mt7621_pcie_parse_dt() Date: Wed, 12 Sep 2018 02:50:08 +0000 Message-ID: <1536720608-106123-1-git-send-email-yuehaibing@huawei.com> X-Mailer: git-send-email 1.8.3.1 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-Originating-IP: [10.175.113.25] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Use PTR_ERR_OR_ZERO rather than if(IS_ERR(...)) + PTR_ERR Signed-off-by: YueHaibing --- drivers/staging/mt7621-pci/pci-mt7621.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/staging/mt7621-pci/pci-mt7621.c b/drivers/staging/mt7621-pci/pci-mt7621.c index ba1f117..d2cb910 100644 --- a/drivers/staging/mt7621-pci/pci-mt7621.c +++ b/drivers/staging/mt7621-pci/pci-mt7621.c @@ -396,10 +396,7 @@ static int mt7621_pcie_parse_dt(struct mt7621_pcie *pcie) } pcie->base = devm_ioremap_resource(dev, ®s); - if (IS_ERR(pcie->base)) - return PTR_ERR(pcie->base); - - return 0; + return PTR_ERR_OR_ZERO(pcie->base); } static int mt7621_pcie_request_resources(struct mt7621_pcie *pcie,