From patchwork Thu Jul 28 16:16:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yongjun X-Patchwork-Id: 9251451 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 9D88F6077C for ; Thu, 28 Jul 2016 16:18:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8DFB727D0E for ; Thu, 28 Jul 2016 16:18:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 830B927D64; Thu, 28 Jul 2016 16:18:00 +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=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4434727D0E for ; Thu, 28 Jul 2016 16:18:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSnzL-0002sA-8b; Thu, 28 Jul 2016 16:16:47 +0000 Received: from mail-pa0-x241.google.com ([2607:f8b0:400e:c03::241]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bSnzI-0002nj-63 for linux-arm-kernel@lists.infradead.org; Thu, 28 Jul 2016 16:16:44 +0000 Received: by mail-pa0-x241.google.com with SMTP id hh10so3799051pac.1 for ; Thu, 28 Jul 2016 09:16:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F8dXKwZSPwQZXL+iefST5/KzeRcIWjbZkJWrSrGmrgY=; b=Yy3hR0mQy4ab26+MjEaTY1xfkFkGNiHuJ7hPgunqf1qyOYCBeOYUHSnf7NiWfc26hg HOfhA3k7rZH2eG3TE9oUhbkRA9UwJp6AE3+cAi4vd3kQE7zJ3SxhSXu75jziPN3oqUGJ Dyah0y62tHsg5WIy3suOm15SpR86nuMSeuj8YBa/fwP+fVezMaNyA/K6VlN/nTv/8fGz KCXZQMgs7WxJaH/qUpR51cv+OJ+P/GyNltjvK+Bn6Efa0eQK3X5uwD9RGMaVrr41/d5y jdqS//pk/9UyW75IrcCHiSxG9vpr2kx1/A/RbKbupAGn0QKJkeWrmFTa/gZrZl+uSR6d NUDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=F8dXKwZSPwQZXL+iefST5/KzeRcIWjbZkJWrSrGmrgY=; b=S9tf1h+8tF4zRxFP9m97+3nEITNqjrk/KApawtK5k5P7692jPBbB+yNIeqWo4kgfjj n9//EXIxb31/xD3iYq2viZtVfxHCXPamul6Cg29hg3wIqv817HKAyQwSZQ3C8P8Ol3KM 7czFXQy7mXjpOGEnSSBH68e3Kwak8rJhyIhk+2XTMQ3Hq41wGbUT5/jOL5U1XHcJV4EZ LZJ82AE0ia6Fc5ZiM0dQ8Sb9W+kvObge8TtEq55vrKeT1yzj/aGtW4GDcixOTAiyMtYu PXvgjZMnMDT4SevLG7ec8sRON8PoeG3Qbb3gXC+8tt2xjySiQw2GB99/nc72hH8cG6Xz n1NA== X-Gm-Message-State: AEkoousMNs0eDriHjZBjKDlq/VRYCWdSTgVXZlxv1ST83pVNmOJK0nlm3qbuEvENxWwNyg== X-Received: by 10.66.80.2 with SMTP id n2mr60357462pax.134.1469722583225; Thu, 28 Jul 2016 09:16:23 -0700 (PDT) Received: from localhost.localdomain.localdomain (ec2-52-192-197-227.ap-northeast-1.compute.amazonaws.com. [52.192.197.227]) by smtp.gmail.com with ESMTPSA id n80sm18334639pfi.19.2016.07.28.09.16.20 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 28 Jul 2016 09:16:22 -0700 (PDT) From: Wei Yongjun To: Murali Karicheri , Bjorn Helgaas Subject: [PATCH -next] PCI: keystone: Fix error return code in ks_add_pcie_port() Date: Thu, 28 Jul 2016 16:16:18 +0000 Message-Id: <1469722578-14863-1-git-send-email-weiyj.lk@gmail.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160728_091644_260104_0C1C6654 X-CRM114-Status: GOOD ( 11.64 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-pci@vger.kernel.org, Wei Yongjun , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Fix to return a negative error code from the request IRQ error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun Acked-By: Murali Karicheri --- drivers/pci/host/pci-keystone.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/pci/host/pci-keystone.c b/drivers/pci/host/pci-keystone.c index 8ba2883..82b461b 100644 --- a/drivers/pci/host/pci-keystone.c +++ b/drivers/pci/host/pci-keystone.c @@ -334,8 +334,9 @@ static int __init ks_add_pcie_port(struct keystone_pcie *ks_pcie, if (ks_pcie->error_irq <= 0) dev_info(&pdev->dev, "no error IRQ defined\n"); else { - if (request_irq(ks_pcie->error_irq, pcie_err_irq_handler, - IRQF_SHARED, "pcie-error-irq", ks_pcie) < 0) { + ret = request_irq(ks_pcie->error_irq, pcie_err_irq_handler, + IRQF_SHARED, "pcie-error-irq", ks_pcie); + if (ret < 0) { dev_err(&pdev->dev, "failed to request error IRQ %d\n", ks_pcie->error_irq); return ret;