[POWERPC] axonram: Do not delete gendisks queue in error path
authorMaxim Shchetynin <maxim@de.ibm.com>
Wed, 22 Aug 2007 17:01:28 +0000 (03:01 +1000)
committerPaul Mackerras <paulus@samba.org>
Sat, 25 Aug 2007 06:58:27 +0000 (16:58 +1000)
On exit do not delete gendisk's queue because this is already done by
del_gendisk(). Doing it twice may cause memory damage.

Signed-off-by: Maximilian <maxim@de.ibm.com>
Signed-off-by: Arnd Bergmann <arnd.bergmann@de.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/sysdev/axonram.c

index eabbf82fda3a016aaed24b9556dbfc0808a4fcac..ab037a3a40db196b0e01f9a15ddf878c354be3d6 100644 (file)
@@ -281,8 +281,6 @@ failed:
                if (bank->irq_id != NO_IRQ)
                        free_irq(bank->irq_id, device);
                if (bank->disk != NULL) {
-                       if (bank->disk->queue != NULL)
-                               blk_cleanup_queue(bank->disk->queue);
                        if (bank->disk->major > 0)
                                unregister_blkdev(bank->disk->major,
                                                bank->disk->disk_name);
@@ -310,7 +308,6 @@ axon_ram_remove(struct of_device *device)
 
        device_remove_file(&device->dev, &dev_attr_ecc);
        free_irq(bank->irq_id, device);
-       blk_cleanup_queue(bank->disk->queue);
        unregister_blkdev(bank->disk->major, bank->disk->disk_name);
        del_gendisk(bank->disk);
        iounmap((void __iomem *) bank->io_addr);