Commit 2422fbba authored by Sebastian Siewior's avatar Sebastian Siewior Committed by Linus Torvalds

metronomefb: don't free firmware twice in error path

Right now, if request_irq or anthing after it fails than we free the firmware
for the second time what might end bad :)
Signed-off-by: default avatarSebastian Siewior <sebastian@breakpoint.cc>
Acked-by: default avatarJaya Kumar <jayakumar.lkml@gmail.com>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 03c33a4f
...@@ -671,14 +671,14 @@ static int __devinit metronomefb_probe(struct platform_device *dev) ...@@ -671,14 +671,14 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
retval = load_waveform((u8 *) fw_entry->data, fw_entry->size, retval = load_waveform((u8 *) fw_entry->data, fw_entry->size,
par->metromem_wfm, 3, 31, &par->frame_count); par->metromem_wfm, 3, 31, &par->frame_count);
release_firmware(fw_entry);
if (retval < 0) { if (retval < 0) {
printk(KERN_ERR "metronomefb: couldn't process waveform\n"); printk(KERN_ERR "metronomefb: couldn't process waveform\n");
goto err_ld_wfm; goto err_dma_free;
} }
release_firmware(fw_entry);
if (board->setup_irq(info)) if (board->setup_irq(info))
goto err_ld_wfm; goto err_dma_free;
retval = metronome_init_regs(par); retval = metronome_init_regs(par);
if (retval < 0) if (retval < 0)
...@@ -719,8 +719,6 @@ static int __devinit metronomefb_probe(struct platform_device *dev) ...@@ -719,8 +719,6 @@ static int __devinit metronomefb_probe(struct platform_device *dev)
framebuffer_release(info); framebuffer_release(info);
err_free_irq: err_free_irq:
board->free_irq(info); board->free_irq(info);
err_ld_wfm:
release_firmware(fw_entry);
err_dma_free: err_dma_free:
dma_free_writecombine(&dev->dev, par->metromemsize, par->metromem, dma_free_writecombine(&dev->dev, par->metromemsize, par->metromem,
par->metromem_dma); par->metromem_dma);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment