ata_host_release() uses drvdata to determine ata_host to release and
clearing drvdata in ->remove_one causes NULL pointer deference. Clear
drvdata only in ata_host_release() after all resources are freed.
This bug was first analyzed by Alan Cox for pata_pcmcia.
Signed-off-by: Tejun Heo <htejun@xxxxxxxxx>
Cc: Alan Cox <alan@xxxxxxxxxxxxxxxxxxx>
---
Alan, this is the bug you talked about, right? I took the fix from
"[BUG] PATA_PCMCIA does not work" and expanded it. If this isn't the
one, please let me know. Thanks.