From: Bartlomiej Zolnierkiewicz Date: Fri, 1 Feb 2008 22:09:35 +0000 (+0100) Subject: ide: I/O resources are released too early in ide_unregister() X-Git-Tag: firefly_0821_release~23571^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=7cba97f12963721eca648d6901b294750a1fa3bd;p=firefly-linux-kernel-4.4.55.git ide: I/O resources are released too early in ide_unregister() Release I/O resources after releasing DMA. Signed-off-by: Bartlomiej Zolnierkiewicz --- diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c index 7fa30acf0fc5..ea7512d99dec 100644 --- a/drivers/ide/ide.c +++ b/drivers/ide/ide.c @@ -529,13 +529,6 @@ void ide_unregister(unsigned int index) free_irq(hwif->irq, hwgroup); spin_lock_irq(&ide_lock); - /* - * Note that we only release the standard ports, - * and do not even try to handle any extra ports - * allocated for weird IDE interface chipsets. - */ - ide_hwif_release_regions(hwif); - /* * Remove us from the hwgroup, and free * the hwgroup if we were the only member @@ -590,6 +583,13 @@ void ide_unregister(unsigned int index) hwif->extra_ports = 0; } + /* + * Note that we only release the standard ports, + * and do not even try to handle any extra ports + * allocated for weird IDE interface chipsets. + */ + ide_hwif_release_regions(hwif); + /* copy original settings */ tmp_hwif = *hwif;