netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Carpenter <error27@gmail.com>
To: Kulikov Vasiliy <segooon@gmail.com>
Cc: kernel-janitors@vger.kernel.org,
	"David S. Miller" <davem@davemloft.net>,
	"Finn Thain" <fthain@telegraphics.com.au>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Tejun Heo" <tj@kernel.org>,
	"Geert Uytterhoeven" <geert@linux-m68k.org>,
	netdev@vger.kernel.org
Subject: Re: [PATCH 2/3] macsonic: free irq if sonic_open() fails
Date: Sat, 10 Jul 2010 13:22:29 +0200	[thread overview]
Message-ID: <20100710112229.GX19184@bicker> (raw)
In-Reply-To: <1278759661-7731-1-git-send-email-segooon@gmail.com>

On Sat, Jul 10, 2010 at 03:01:00PM +0400, Kulikov Vasiliy wrote:

> +	if (dev->irq == IRQ_AUTO_3) {
> +		retval = request_irq(IRQ_NUBUS_9, macsonic_interrupt,
> +					IRQ_FLG_FAST, "sonic", dev);
> +		if (retval) {
> +			printk(KERN_ERR "%s: unable to get IRQ %d.\n",
> +					dev->name, IRQ_NUBUS_9);
> +			goto err_irq;
>  		}
> -	return sonic_open(dev);
> +	}
> +	retval = sonic_open(dev);
> +	if (retval)
> +		goto err_irq_nubus;
> +	return 0;
> +
> +err_irq_nubus:

This should be:

+	if (dev->irq == IRQ_AUTO_3)
+		free_irq(IRQ_NUBUS_9, dev);

> +err_irq:
> +	free_irq(dev->irq, dev);
> +err:
> +	return retval;
>  }

regards,
dan carpenter


  reply	other threads:[~2010-07-10 11:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-10 11:01 [PATCH 2/3] macsonic: free irq if sonic_open() fails Kulikov Vasiliy
2010-07-10 11:22 ` Dan Carpenter [this message]
2010-07-10 11:30   ` Kulikov Vasiliy
2010-07-10 11:39     ` [PATCH 2/3 v2] macsonic: free irqs " Kulikov Vasiliy
2010-07-13  3:33       ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100710112229.GX19184@bicker \
    --to=error27@gmail.com \
    --cc=davem@davemloft.net \
    --cc=fthain@telegraphics.com.au \
    --cc=geert@linux-m68k.org \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=segooon@gmail.com \
    --cc=tj@kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).