From patchwork Tue Apr 17 10:43:56 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 7891 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 6BD9E23E00 for ; Tue, 17 Apr 2012 10:44:41 +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 2E4AAA181C2 for ; Tue, 17 Apr 2012 10:44:41 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id e36so12004590iag.11 for ; Tue, 17 Apr 2012 03:44:41 -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=okUKYZlNBbmQv4XKuSNIov8zQgSQaG++cTMos2ynjds=; b=Lk8y0UIo/vul2q+7rmXRNBpYTVIyX5YxhZHxcpFsfjgR2do1V4t/B7Db3guz2xRZJN bJPeFtULGwsFj5B2RF66GqxA3wF4WV583jKA9Ul+tQ7CGpjQ1K7g1bozBbutX0VNJzEv eRocIP4i8ERV6VhSb5xCGqFY/h35wlk1TwB7SU7vwxFOOiVT9oz6DBv+V7aZ5s6CsO6m V6z5NCuPB2qVH0rrq7KkdkYSyVywhROpZ43Xt0qSI/vG68KE1Ojc+2EeNOA+ZIZ6Dalp f8EyjYqLe258kFyHYwlqFk2ipcLvS+klWYDw3Le6crQ/bi+9pDo4vMzt9uMyb+uzZPGu G7AA== Received: by 10.50.193.199 with SMTP id hq7mr8614707igc.49.1334659480966; Tue, 17 Apr 2012 03:44:40 -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 x6csp138679ibt; Tue, 17 Apr 2012 03:44:40 -0700 (PDT) Received: by 10.180.105.69 with SMTP id gk5mr6855764wib.3.1334659479785; Tue, 17 Apr 2012 03:44:39 -0700 (PDT) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) by mx.google.com with ESMTPS id b2si11644828wiz.1.2012.04.17.03.44.39 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:44:39 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.82.42 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.82.42; Authentication-Results: mx.google.com; spf=neutral (google.com: 74.125.82.42 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-f42.google.com with SMTP id ds11so488629wgb.1 for ; Tue, 17 Apr 2012 03:44:39 -0700 (PDT) Received: by 10.180.85.70 with SMTP id f6mr6030398wiz.5.1334659479207; Tue, 17 Apr 2012 03:44:39 -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 fn2sm42069492wib.0.2012.04.17.03.44.34 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Apr 2012 03:44:38 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org Cc: arnd@arndb.de, linus.walleij@stericsson.com, grant.likely@secretlab.ca, cjb@laptop.org, linux@arm.linux.org.uk, Lee Jones Subject: [PATCH 04/16] drivers/net: Do not free an IRQ if its request failed Date: Tue, 17 Apr 2012 11:43:56 +0100 Message-Id: <1334659448-11521-5-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.7.9.1 In-Reply-To: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> References: <1334659448-11521-1-git-send-email-lee.jones@linaro.org> X-Gm-Message-State: ALoCoQniVumrDNRBn2o6/AZ/Szvdi1QuwELtmbghpvkRi9Jv5dS4BwCgyNdXAsPmmCOdFYz0BDr4 Refrain from attempting to free an interrupt line if the request fails and hence, there is no IRQ to free. 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);