From patchwork Sat Oct 14 22:07:27 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 10006649 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 0197460230 for ; Sat, 14 Oct 2017 22:07:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D468C28BBA for ; Sat, 14 Oct 2017 22:07:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B41F5291F2; Sat, 14 Oct 2017 22:07:51 +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 CEF9428BBA for ; Sat, 14 Oct 2017 22:07:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751378AbdJNWHn (ORCPT ); Sat, 14 Oct 2017 18:07:43 -0400 Received: from mail-qt0-f193.google.com ([209.85.216.193]:47459 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751138AbdJNWHn (ORCPT ); Sat, 14 Oct 2017 18:07:43 -0400 Received: by mail-qt0-f193.google.com with SMTP id z50so25437062qtj.4 for ; Sat, 14 Oct 2017 15:07:43 -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; bh=BJU1rYiOBBBqj+LOXFPniN3pJQkqWv4cwCDe48N8g30=; b=tXlXkItykoRKKXAYvafYpm3SViHLNdB7KE9rMDOPhqCw4VCTWlHbsGH9cTtx0TdNbZ dbiSuGTZhm8I8Hosn2jk1GrgiY8R03ivKt+NQSYyIV4bueFjsiX750BPnkVD0e5Lyxuq UJBnNFtpLprKXcvRRfudm+7fBby8Q2EtuIs6yfK9JafM7uY5p2QME5qi5a1dM2DtJnw6 daIA0yZpE3oBrNgI7WIcdon5aypwgO+f/Vn24TDyKRQbWf1x8uJJ+46Sv6vHgdy1pwas ruvfE7690bGNmInUeUoXcztI52SVzQQEKZTRr2rAbCNmY/yc06pc8JkLGvkZ/FYdilQF FVhQ== 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=BJU1rYiOBBBqj+LOXFPniN3pJQkqWv4cwCDe48N8g30=; b=Lzzj8kFAI6hh7DLc6CVlfqzfKq9n7lmZg6A3nCHcHpPH4odVLKqUigSGKsHGQdT6sY vgMWmZDqBkMNAcg1DR/kJ+N+1zv09dSoQdiQXkDgeNtS5/ydTNOeqJpYgstHz6jmfO0M awFZVB170fWBAf8YhULCn1wSMHN6rR9eqA5zk66XMU12/7Kn6QQimFDck1uWJ7erqUZy n+4gElmdMFsi5ACCBvDv8GjVVr4P4V+Et3QLZs2e1XNgbqKB43hBhqlBkjQyTIpcJSMT J8KVV3zESVFTH3J5TFbEPon/s0ZlXCpig1eWlmjBXGoKJ4djTHMFgiBLFeBhORBgcybW zrcw== X-Gm-Message-State: AMCzsaUsgWSx18lyHB4rXtAnPSHFdgERJ/kOhTzw6b+ib8KzA98Zlks3 wX0mrjNGGenZVHSTHEPgRd0= X-Google-Smtp-Source: AOwi7QBUkS15v2Ox7wYmttNLYi+YiEaDojUsGcLpl8PgieASJY1uQ/SCK7Si0/MrhGHObCoTyQ2w5g== X-Received: by 10.200.24.49 with SMTP id q46mr7606070qtj.139.1508018862425; Sat, 14 Oct 2017 15:07:42 -0700 (PDT) Received: from localhost.localdomain ([187.180.180.72]) by smtp.gmail.com with ESMTPSA id c10sm2547758qtj.29.2017.10.14.15.07.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 14 Oct 2017 15:07:41 -0700 (PDT) From: Fabio Estevam To: bhelgaas@google.com Cc: linux-pci@vger.kernel.org, Fabio Estevam , Thomas Petazzoni Subject: [PATCH 1/5] PCI: aardvark: Check for platform_get_irq() error Date: Sat, 14 Oct 2017 19:07:27 -0300 Message-Id: <1508018851-9272-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 platform_get_irq() may fail and in the case of failure the error value should be propagated. Cc: Thomas Petazzoni Signed-off-by: Fabio Estevam --- drivers/pci/host/pci-aardvark.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/pci/host/pci-aardvark.c b/drivers/pci/host/pci-aardvark.c index 26ed0c0..f3b16ff 100644 --- a/drivers/pci/host/pci-aardvark.c +++ b/drivers/pci/host/pci-aardvark.c @@ -901,6 +901,8 @@ static int advk_pcie_probe(struct platform_device *pdev) return PTR_ERR(pcie->base); irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; ret = devm_request_irq(dev, irq, advk_pcie_irq_handler, IRQF_SHARED | IRQF_NO_THREAD, "advk-pcie", pcie);