From patchwork Sat Oct 14 22:07: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: 10006653 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 94F8B60230 for ; Sat, 14 Oct 2017 22:07:52 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8847D28BBA for ; Sat, 14 Oct 2017 22:07:52 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D6DC291EF; Sat, 14 Oct 2017 22:07:52 +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=-6.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 1EA49291E2 for ; Sat, 14 Oct 2017 22:07:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751416AbdJNWHr (ORCPT ); Sat, 14 Oct 2017 18:07:47 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:54728 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbdJNWHr (ORCPT ); Sat, 14 Oct 2017 18:07:47 -0400 Received: by mail-qk0-f195.google.com with SMTP id n5so8836492qke.11 for ; Sat, 14 Oct 2017 15:07:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=3eb3rGsbrkWHiZeW6LzUR23Yx63+CAIlHqupy28mdUQ=; b=V6+eEWBUXWbSiJG0flm8Sl0n86EQ4NvkrJEb/Ka0p09Uoo40mugqnAiXlEqfjd37bx A77AESq8q/54YztCeEt6JJJUn9bqAwrG7Glp/OnXHXzRt1htIZQeFVKOKkpvMO7Mj8jr ElBWSYTJAOr2x/QdF8ASBCZX4YyLAuKuYG1SjV+Qen49WQK5Pado4b8WwaB1PuIpUps+ aK4Mi9siU3FCIzrlSTyZKlkdXYhhPbddhFCaC97j6JsHftKfYMa97N8/yThxl3uLHQds bLkz9DAjTVFPf5ejtVjEC3KSVgFTexTKcASywM7Puzg3rTlPjJrPesfpf7VFdEl1HQB2 g71Q== 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:in-reply-to :references; bh=3eb3rGsbrkWHiZeW6LzUR23Yx63+CAIlHqupy28mdUQ=; b=mx7CkMRoCASEjfC0CeQq30Q1bH+TZxPRden9tHq+cGZeAqiICmRcXXM9ULHyh/ZLNu aCvQKW2yPZ3lvLWxDvvmmFVESIQKlf0DJPi9q4eHCgmK0IOur4H0n5OIXDocJTPNdK+H XOgSoQSpTa2qAekkuoIuQv7oUtUnMQgweemWVlbOnjIVorUbM9V7FXujGXRoBoXXRCzh 7RgXMVXxa++fNQ0vuWPrugqhztZOLEkjv32dLDQ4yQJWrUqjHOp5Oa1QNp3OwxFxEVm2 yii7mRENl5YktKitRnY9Ds5umJH4C+oHJ4JCB1qxBvyvFdblkHkqFlHHSCfIbT7jhi/X SuSg== X-Gm-Message-State: AMCzsaX1nwA4Cq/chKphMgsBPixUA8I6nPv0vM6LhGTUvlA7XhogGjPN +IXoP7Q0N+I8q2eWyzb68+M= X-Google-Smtp-Source: ABhQp+TAi1Vs1cH+bp9u1sSIAWG9qBXoX9C0VUJCzA1yeYcnHv3ncjFSWWNAjQwcbPqtB0PKBcnmPA== X-Received: by 10.55.25.85 with SMTP id k82mr7395411qkh.223.1508018866471; Sat, 14 Oct 2017 15:07:46 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.72]) by smtp.gmail.com with ESMTPSA id c10sm2547758qtj.29.2017.10.14.15.07.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 15:07:46 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, Fabio Estevam , Ryder Lee Subject: [PATCH 3/5] PCI: mediatek: Check for platform_get_irq() error Date: Sat, 14 Oct 2017 19:07:29 -0300 Message-Id: <1508018851-9272-3-git-send-email-festevam@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1508018851-9272-1-git-send-email-festevam@gmail.com> References: <1508018851-9272-1-git-send-email-festevam@gmail.com> 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 platform_get_irq() may fail and in the case of failure the error value should be propagated. Cc: Ryder Lee Signed-off-by: Fabio Estevam --- drivers/pci/host/pcie-mediatek.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/host/pcie-mediatek.c b/drivers/pci/host/pcie-mediatek.c index db93efd..05f8c33 100644 --- a/drivers/pci/host/pcie-mediatek.c +++ b/drivers/pci/host/pcie-mediatek.c @@ -642,6 +642,8 @@ static int mtk_pcie_setup_irq(struct mtk_pcie_port *port, int err, irq; irq = platform_get_irq(pdev, port->slot); + if (irq < 0) + return irq; err = devm_request_irq(dev, irq, mtk_pcie_intr_handler, IRQF_SHARED, "mtk-pcie", port); if (err) {