lkml.org 
[lkml]   [2009]   [Apr]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH #upstream-fixes] pata_legacy: fix no device fail path
    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 <tj@kernel.org>
    Reported-by: Peter Zijlstra <peterz@infradead.org>
    ---
    Well, with or without test verification, this patch is correct. Thanks.

    drivers/ata/pata_legacy.c | 1 +
    1 file changed, 1 insertion(+)

    diff --git a/drivers/ata/pata_legacy.c b/drivers/ata/pata_legacy.c
    index 3f830f0..0c6dde8 100644
    --- a/drivers/ata/pata_legacy.c
    +++ b/drivers/ata/pata_legacy.c
    @@ -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;

    \
     
     \ /
      Last update: 2009-04-14 06:01    [W:6.640 / U:0.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site