]> Git Repo - linux.git/commitdiff
pata_legacy: fix no device fail path
authorTejun Heo <[email protected]>
Tue, 14 Apr 2009 03:59:03 +0000 (12:59 +0900)
committerJeff Garzik <[email protected]>
Thu, 16 Apr 2009 19:21:22 +0000 (15:21 -0400)
When pata_legacy can't detect any device, it unregisters the
platform_device and fails detection.  However, it forgets to detach
ata host triggering weird failures as the host later gets freed by
devres while still attached.  Fix it.

Signed-off-by: Tejun Heo <[email protected]>
Reported-by: Peter Zijlstra <[email protected]>
Signed-off-by: Jeff Garzik <[email protected]>
drivers/ata/pata_legacy.c

index 3f830f0fe2cc515884452253420b14980781d3d3..0c6dde80417b00b552cc50549527bc8697bfcbaf 100644 (file)
@@ -1032,6 +1032,7 @@ static __init int legacy_init_one(struct legacy_probe *probe)
                        return 0;
                }
        }
+       ata_host_detach(host);
 fail:
        platform_device_unregister(pdev);
        return ret;
This page took 0.053683 seconds and 4 git commands to generate.