From patchwork Thu Feb 13 03:03:12 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Magnus Damm X-Patchwork-Id: 3642061 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: X-Original-To: patchwork-linux-pci@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 64E469F334 for ; Thu, 13 Feb 2014 03:04:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A72292015D for ; Thu, 13 Feb 2014 03:04:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DAF7320145 for ; Thu, 13 Feb 2014 03:04:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752129AbaBMDCB (ORCPT ); Wed, 12 Feb 2014 22:02:01 -0500 Received: from mail-pb0-f48.google.com ([209.85.160.48]:39767 "EHLO mail-pb0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751417AbaBMDCA (ORCPT ); Wed, 12 Feb 2014 22:02:00 -0500 Received: by mail-pb0-f48.google.com with SMTP id rr13so10115916pbb.21 for ; Wed, 12 Feb 2014 19:01:59 -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=0ZXB7cBQeD0X3oVsG6nM8LFAfHAyNnLQgOPiDyLRfJkOOPqtJWDXdcH1Pcg+O2Q5Jk azI+7k07kIZS5jema27NbrUJP/q+9+BKct/l2D6wlS7xL39E8gihkNJkn9Tk45KIgLb5 ZJsTC4uHOCJsxzdzh0q39u4FBhviKYE0FcwSGozQIa/rBhu1jEEtuwm4q5RtCbrFnQjm /FBConemilwoGHb7AWtHTT3JOEvCtHP/8ZFRFnRheu68KoYJB2NSAZTCPHQ+CW6aH3kV ldqMmQRbNr7H/fOWS7htlnO1UcwVu2AY7kvYTI6Q3Vsgfen0N+2MAbpZjrjccG9eiW27 wbrw== X-Received: by 10.68.204.161 with SMTP id kz1mr25761557pbc.156.1392260519579; Wed, 12 Feb 2014 19:01:59 -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 nz11sm2951457pab.6.2014.02.12.19.01.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Feb 2014 19:01:57 -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: Thu, 13 Feb 2014 12:03:12 +0900 Message-Id: <20140213030312.10398.47163.sendpatchset@w520> In-Reply-To: <20140213030302.10398.37322.sendpatchset@w520> References: <20140213030302.10398.37322.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.4 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); }