mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
ide-cs: fix releasing I/O resources
hwif content is already freed after ide_release() call so cache hwif->io_ports.{data,ctl}_addr in local variables in ide_detach(). This fixes post-2.6.25 regression. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
parent
792a1a9856
commit
fbc69fd9b7
1 changed files with 6 additions and 2 deletions
|
@ -135,13 +135,17 @@ static void ide_detach(struct pcmcia_device *link)
|
|||
{
|
||||
ide_info_t *info = link->priv;
|
||||
ide_hwif_t *hwif = info->hwif;
|
||||
unsigned long data_addr, ctl_addr;
|
||||
|
||||
DEBUG(0, "ide_detach(0x%p)\n", link);
|
||||
|
||||
data_addr = hwif->io_ports.data_addr;
|
||||
ctl_addr = hwif->io_ports.ctl_addr;
|
||||
|
||||
ide_release(link);
|
||||
|
||||
release_region(hwif->io_ports.ctl_addr, 1);
|
||||
release_region(hwif->io_ports.data_addr, 8);
|
||||
release_region(ctl_addr, 1);
|
||||
release_region(data_addr, 8);
|
||||
|
||||
kfree(info);
|
||||
} /* ide_detach */
|
||||
|
|
Loading…
Reference in a new issue