mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 00:56:45 +07:00
[POWERPC] axonram: Do not delete gendisks queue in error path
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>
This commit is contained in:
parent
fedcd2c53d
commit
b0e81ebb10
@ -281,8 +281,6 @@ axon_ram_probe(struct of_device *device, const struct of_device_id *device_id)
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user