From patchwork Tue Feb 18 02:10:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3666721 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id ED505BF13A for ; Tue, 18 Feb 2014 02:12:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2A693201D3 for ; Tue, 18 Feb 2014 02:12:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4AB94201C7 for ; Tue, 18 Feb 2014 02:12:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753966AbaBRCJj (ORCPT ); Mon, 17 Feb 2014 21:09:39 -0500 Received: from mail-pd0-f177.google.com ([209.85.192.177]:53670 "EHLO mail-pd0-f177.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752968AbaBRCJh (ORCPT ); Mon, 17 Feb 2014 21:09:37 -0500 Received: by mail-pd0-f177.google.com with SMTP id x10so15402719pdj.8 for ; Mon, 17 Feb 2014 18:09:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:date:message-id:in-reply-to:references:subject; bh=5f+CyK737ATgDKGhC6H5uCB8QHV/PY9HX7QjrAiRC3s=; b=JYh18XYwUhDpYlZLhXinWmMw68kUGrr+p/0ayPvMpgdRFQqiXdS2vt1Ua7VwK/hL7u GBRowkI8DB+iZQ4QhX6C3Ds0BXWSQSVapR2oilG4cprmQ957cpy8jBSoSGZQhQ8Jtk8q vle1jH2O9n5lUOM7uWl6BfYTfNzuKJX2EOTE8stXwYzNUMDAttZD9fKpvzejbM9WMctR 8VcJMunF10FOHr065bn4qmqZov/VBmcdwFqD055CCJHdOmyGHqv8jxkDckvD8kESTBkP /vsXV2qNZDknNGiN3/SP+/I3bap8Nsqehzx77XFyGSmzGuaarqXlNv6gQNfKvedc7hli ZPXQ== X-Received: by 10.66.163.2 with SMTP id ye2mr29576334pab.110.1392689376980; Mon, 17 Feb 2014 18:09:36 -0800 (PST) Received: from [127.0.0.1] (s214090.ppp.asahi-net.or.jp. [220.157.214.90]) by mx.google.com with ESMTPSA id un5sm129905783pab.3.2014.02.17.18.09.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Feb 2014 18:09:35 -0800 (PST) From: Magnus Damm To: linux-pci@vger.kernel.org Cc: horms@verge.net.au, linux-sh@vger.kernel.org, linux-kernel@vger.kernel.org, valentine.barshak@cogentembedded.com, ben.dooks@codethink.co.uk, geert@linux-m68k.org, bhelgaas@google.com, Magnus Damm Date: Tue, 18 Feb 2014 11:10:51 +0900 Message-Id: <20140218021051.14164.6194.sendpatchset@w520> In-Reply-To: <20140218021041.14164.56411.sendpatchset@w520> References: <20140218021041.14164.56411.sendpatchset@w520> Subject: [PATCH 01/08] PCI: rcar: check platform_get_irq() return code Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ben Dooks The current code does not check the return from platform_get_irq() so add an error check and return if this call does fail. Signed-off-by: Ben Dooks Signed-off-by: Magnus Damm --- drivers/pci/host/pci-rcar-gen2.c | 5 +++++ 1 file changed, 5 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-pci" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 0001/drivers/pci/host/pci-rcar-gen2.c +++ work/drivers/pci/host/pci-rcar-gen2.c 2014-02-13 09:41:55.000000000 +0900 @@ -308,6 +308,11 @@ static int __init rcar_pci_probe(struct priv->reg = reg; priv->dev = &pdev->dev; + if (priv->irq < 0) { + dev_err(&pdev->dev, "no valid irq found\n"); + return priv->irq; + } + return rcar_pci_add_controller(priv); }