From patchwork Thu Apr 19 20:36:33 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7956 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id DE9FD23E20 for ; Thu, 19 Apr 2012 20:37:06 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id 9F090A180F3 for ; Thu, 19 Apr 2012 20:37:06 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so16953504iag.11 for ; Thu, 19 Apr 2012 13:37:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=jMwAFIM5mCqYsogerAZeUPQ22nFXrKKO3CB3Yc3IYqE=; b=SI9rTKAzoKkPlmB6bSObpSh2JsT+FyRgZ/T3mL9kpMbQjfOzPlyDz6NypOQjT9SG47 ptBamBIhIvEU1KjNAgbzIGSCr4mrfxZ9c3l0fdMa/49hE1Y6/3Eqp0fywg8Ev4D9NFUL tbTQLlFwwf1d8gQ4ewfpgRVxHKtIuz9dKohjoIXVgC/NiQixJFarqNYisvJedlGlnYNd c5vMR4eUqdsJjr2da+Rh5hcFYntamvMRbhC5EvZgWwaHX557JnyIU0dv0bpe5SBBjHq6 2IxrTwsSj+0PQx04qQqlxwWIyPpPt4E1ExqSwKMa0EaNYUP/DlChI8h2dhd9CcaSh37q TyCQ== Received: by 10.50.196.230 with SMTP id ip6mr3754100igc.49.1334867826345; Thu, 19 Apr 2012 13:37:06 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp317225ibt; Thu, 19 Apr 2012 13:37:05 -0700 (PDT) Received: by 10.180.78.164 with SMTP id c4mr1163939wix.10.1334867825009; Thu, 19 Apr 2012 13:37:05 -0700 (PDT) Received: from mail-wg0-f50.google.com (mail-wg0-f50.google.com [74.125.82.50]) by mx.google.com with ESMTPS id fr6si117782wib.15.2012.04.19.13.37.04 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:05 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.50 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) smtp.mail=lee.jones@linaro.org Received: by mail-wg0-f50.google.com with SMTP id ds12so8717086wgb.31 for ; Thu, 19 Apr 2012 13:37:04 -0700 (PDT) Received: by 10.216.150.148 with SMTP id z20mr2283766wej.22.1334867824502; Thu, 19 Apr 2012 13:37:04 -0700 (PDT) Received: from localhost.localdomain (cpc1-aztw13-0-0-cust473.18-1.cable.virginmedia.com. [77.102.241.218]) by mx.google.com with ESMTPS id h8sm345540wix.4.2012.04.19.13.37.02 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 19 Apr 2012 13:37:03 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk Cc: Lee Jones , netdev@vger.kernel.org Subject: [PATCH 04/15] drivers/net: Do not free an IRQ if its request failed Date: Thu, 19 Apr 2012 21:36:33 +0100 Message-Id: <1334867804-31942-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> References: <1334867804-31942-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQnd6vPlxSvHKQuuoE7KSmHXKF15SnhXVJLwN4cJxVFuFpsWcbn89mevVQjKovRxx6wSDDMw Refrain from attempting to free an interrupt line if the request fails and hence, there is no IRQ to free. CC: netdev@vger.kernel.org Signed-off-by: Lee Jones --- drivers/net/ethernet/smsc/smsc911x.c | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/smsc/smsc911x.c b/drivers/net/ethernet/smsc/smsc911x.c index 4a69710..f17a76e 100644 --- a/drivers/net/ethernet/smsc/smsc911x.c +++ b/drivers/net/ethernet/smsc/smsc911x.c @@ -2382,7 +2382,6 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) SET_NETDEV_DEV(dev, &pdev->dev); pdata = netdev_priv(dev); - dev->irq = irq_res->start; irq_flags = irq_res->flags & IRQF_TRIGGER_MASK; pdata->ioaddr = ioremap_nocache(res->start, res_size); @@ -2446,7 +2445,7 @@ static int __devinit smsc911x_drv_probe(struct platform_device *pdev) if (retval) { SMSC_WARN(pdata, probe, "Unable to claim requested irq: %d", dev->irq); - goto out_free_irq; + goto out_disable_resources; } retval = register_netdev(dev);