diff mbox

[v1,1/4] ALSA: fm801: explicitly free IRQ line

Message ID 1450466053-52170-1-git-send-email-andriy.shevchenko@linux.intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Andy Shevchenko Dec. 18, 2015, 7:14 p.m. UTC
Otherwise we will have a warning on ->remove() since device is a PCI one.

WARNING: CPU: 4 PID: 1411 at /home/andy/prj/linux/fs/proc/generic.c:575 remove_proc_entry+0x137/0x160()
remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'snd_fm801'

Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
The patch series has been tested on SF64-PCR card.
 sound/pci/fm801.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Takashi Iwai Dec. 20, 2015, 9:34 p.m. UTC | #1
On Fri, 18 Dec 2015 20:14:10 +0100,
Andy Shevchenko wrote:
> 
> Otherwise we will have a warning on ->remove() since device is a PCI one.
> 
> WARNING: CPU: 4 PID: 1411 at /home/andy/prj/linux/fs/proc/generic.c:575 remove_proc_entry+0x137/0x160()
> remove_proc_entry: removing non-empty directory 'irq/21', leaking at least 'snd_fm801'
> 
> Fixes: 5618955c4269 (ALSA: fm801: move to pcim_* and devm_* functions)
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> The patch series has been tested on SF64-PCR card.

Applied all four patches.  Thanks.


Takashi

>  sound/pci/fm801.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
> index 1fdd92b6..f57847c 100644
> --- a/sound/pci/fm801.c
> +++ b/sound/pci/fm801.c
> @@ -1165,6 +1165,8 @@ static int snd_fm801_free(struct fm801 *chip)
>  	cmdw |= 0x00c3;
>  	fm801_writew(chip, IRQ_MASK, cmdw);
>  
> +	devm_free_irq(&chip->pci->dev, chip->irq, chip);
> +
>        __end_hw:
>  #ifdef CONFIG_SND_FM801_TEA575X_BOOL
>  	if (!(chip->tea575x_tuner & TUNER_DISABLED)) {
> -- 
> 2.6.4
> 
> .
>
diff mbox

Patch

diff --git a/sound/pci/fm801.c b/sound/pci/fm801.c
index 1fdd92b6..f57847c 100644
--- a/sound/pci/fm801.c
+++ b/sound/pci/fm801.c
@@ -1165,6 +1165,8 @@  static int snd_fm801_free(struct fm801 *chip)
 	cmdw |= 0x00c3;
 	fm801_writew(chip, IRQ_MASK, cmdw);
 
+	devm_free_irq(&chip->pci->dev, chip->irq, chip);
+
       __end_hw:
 #ifdef CONFIG_SND_FM801_TEA575X_BOOL
 	if (!(chip->tea575x_tuner & TUNER_DISABLED)) {