Skip to content

Commit

Permalink
staging: goldfish: Call free_irq in error path
Browse files Browse the repository at this point in the history
If misc_register failed in goldfish_audio_probe, the already requested
IRQ wouldn't get freed. Add a call to free_irq() like there is in
goldfish_audio_remove().

Signed-off-by: Tuomas Tynkkynen <tuomas.tynkkynen@iki.fi>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Tuomas Tynkkynen authored and Greg Kroah-Hartman committed Apr 16, 2014
1 parent 5ed0a8e commit ff8ebe6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/staging/goldfish/goldfish_audio.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,6 +334,7 @@ static int goldfish_audio_probe(struct platform_device *pdev)
return 0;

err_misc_register_failed:
free_irq(data->irq, data);
err_request_irq_failed:
dma_free_coherent(&pdev->dev, COMBINED_BUFFER_SIZE,
data->buffer_virt, data->buffer_phys);
Expand Down

0 comments on commit ff8ebe6

Please sign in to comment.