From: Takashi Iwai <tiwai@suse.de>
To: postfail@hushmail.com
Cc: <kernel-janitors@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-sound@vger.kernel.org>
Subject: Re: [PATCH 2/3] sound/pci ioremap/iounmap balancing
Date: Wed, 01 Aug 2007 12:38:16 +0200 [thread overview]
Message-ID: <s5hps27tu93.wl%tiwai@suse.de> (raw)
In-Reply-To: <20070801060256.F0BA2DA820@mailserver8.hushmail.com>
At Wed, 01 Aug 2007 02:02:56 -0400,
Scott Thompson wrote:
>
> ioremap / iounmap balancing in sound/pci tree
>
> Signed-off-by: Scott Thompson <postfail <at> hushmail.com>
> ---
> diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
> index ac007ce..871b09f 100644
> --- a/sound/pci/mixart/mixart.c
> +++ b/sound/pci/mixart/mixart.c
> @@ -1319,6 +1319,13 @@ static int __devinit snd_mixart_probe(struct
> pci_dev *pci,
> pci_resource_len(pci, i));
> }
>
> + if (!mgr->mem[0].virt || !mgr->mem[1].virt){
> + printk(KERN_ERR "unable to remap resource 0x%lx and/or 0x%lx\n",
> + mgr->mem[0].phys, mgr->mem[1].phys);
> + snd_mixart_free(mgr);
> + return -EBUSY;
> + }
> +
> if (request_irq(pci->irq, snd_mixart_interrupt, IRQF_SHARED,
> CARD_NAME, mgr)) {
> snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
This would be rater a lacking check of returned errors.
The other changes look incorrect. All these drivers use
card->private_free callback to release the resources even for the
error exit. Thus, you don't need iounmap in each place.
thanks,
Takashi
next prev parent reply other threads:[~2007-08-01 10:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-01 6:02 [PATCH 2/3] sound/pci ioremap/iounmap balancing Scott Thompson
2007-08-01 10:38 ` Takashi Iwai [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-08-01 13:25 Scott Thompson
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=s5hps27tu93.wl%tiwai@suse.de \
--to=tiwai@suse.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sound@vger.kernel.org \
--cc=postfail@hushmail.com \
/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