From patchwork Wed Dec 20 00:38:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10124785 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id E5EA96057F for ; Wed, 20 Dec 2017 00:38:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB7F7289A0 for ; Wed, 20 Dec 2017 00:38:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C01BC292E6; Wed, 20 Dec 2017 00:38:41 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5956F289A0 for ; Wed, 20 Dec 2017 00:38:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753762AbdLTAik (ORCPT ); Tue, 19 Dec 2017 19:38:40 -0500 Received: from mail-qk0-f194.google.com ([209.85.220.194]:33752 "EHLO mail-qk0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753740AbdLTAik (ORCPT ); Tue, 19 Dec 2017 19:38:40 -0500 Received: by mail-qk0-f194.google.com with SMTP id x7so7403399qkb.0 for ; Tue, 19 Dec 2017 16:38:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=/WSH+wmXmexDZEi2k4dlqIuMz+LjPeu3ptw4K5nGZV0=; b=HCUtuyDViOZEcygG4NIbpHWm7UUqiFV3GRtiEAq+v0HJZEYzPxOUfKQLyXhsksw/4O vowWAuC43QSu20X4Q+iBIO+Y5T4tK04fuH3v+ofWRejKis0gbB2SOoucPAd7RKovhxSq NSBuCP3YEYjEddGr+1zl6BTSRtRoCZKnea5bFo3h30ZhmWZppO3xS2kJ0WevEEKRtg2v JQECRCk55+GPJFDqtuW89ClDJmq4YqdpO7A3D5aSKTQVhqQ+yUu7cHjU5kkA1mpCg1aN AyyxZ1ZhitKQlgPBu1MNK5B3XfCL61Ei3H76rGIhviqgZ+zDTFZMEO/LdfaFIje8VzBi CGvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=/WSH+wmXmexDZEi2k4dlqIuMz+LjPeu3ptw4K5nGZV0=; b=fYyrWlYpJgASq8jQrNz5s2Gx7d3pRaY81Rn/5NMAXs+tBgP+fUBHuoV9XHkiCeg6mt Jvt7fT4MiiXSxh6ofP5hn+Zi4v3/UT8f3XVfXVVko4owDWI/j3LnXfmRqMZoG7ejpVNv ZUlKMY//isJITt2u2jgCQggZTngicWAz9oI+Kr3VYynS6p66E8/g52j0ldxHsrkaPGWD xPnf1guxBWrwMh0I8mpShg2bfo9ds5fUvGVYaeLnMU7WmaifcHu8Wm4HHf0shgIuaBrg UTju9CGiOXD92Zvdxs8MOHCte2STG1aEJ8SFQJVAzqvIi1SnhT2E5tUDoip0Kb+QTk/Z nOKw== X-Gm-Message-State: AKGB3mLfyxejpvZObPP/3L8XRfkuZOEVyeaQD5e0FMsUmSRoJr9Yl3RD YxLTFkXiFGHI4XgXzeFFCAnQDSp9 X-Google-Smtp-Source: ACJfBov0rW6FGIvUNh+1QlxMuaZvXd+NAst2TX/U1Eeb0/Goq9jcYNbqMRaRXFP4v6uqsAZNEvP7CA== X-Received: by 10.55.19.158 with SMTP id 30mr7398684qkt.98.1513730319361; Tue, 19 Dec 2017 16:38:39 -0800 (PST) Received: from localhost.localdomain ([2804:14c:482:827:9cc6:7b4c:835a:ec10]) by smtp.gmail.com with ESMTPSA id g200sm10366787qke.55.2017.12.19.16.38.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 19 Dec 2017 16:38:38 -0800 (PST) From: Fabio Estevam To: bhelgaas@google.com Cc: dhdang@apm.com, linux-pci@vger.kernel.org, Fabio Estevam Subject: [PATCH] PCI: xgene: Fix the error return code Date: Tue, 19 Dec 2017 22:38:29 -0200 Message-Id: <1513730309-18831-1-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In the case of IS_ERR() error, we should return PTR_ERR(). Fix the error return code. Signed-off-by: Fabio Estevam --- drivers/pci/host/pci-xgene-msi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/host/pci-xgene-msi.c b/drivers/pci/host/pci-xgene-msi.c index 1f42a20..4a1fb01 100644 --- a/drivers/pci/host/pci-xgene-msi.c +++ b/drivers/pci/host/pci-xgene-msi.c @@ -465,7 +465,7 @@ static int xgene_msi_probe(struct platform_device *pdev) xgene_msi->msi_regs = devm_ioremap_resource(&pdev->dev, res); if (IS_ERR(xgene_msi->msi_regs)) { dev_err(&pdev->dev, "no reg space\n"); - rc = -EINVAL; + rc = PTR_ERR(xgene_msi->msi_regs); goto error; } xgene_msi->msi_addr = res->start;