[PCMCIA MTD] Fix leak and crash on reboot
Signed-off-by: Sean Young <sean@mess.org> Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
parent
c172471b78
commit
599fb3298b
@ -713,6 +713,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link)
|
||||
|
||||
if(dev->mtd_info) {
|
||||
del_mtd_device(dev->mtd_info);
|
||||
map_destroy(dev->mtd_info);
|
||||
info("mtd%d: Removed", dev->mtd_info->index);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user