diff options
| author | Gwendal Grignou <gwendal@chromium.org> | 2017-03-03 09:00:09 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-08 10:14:20 +0200 |
| commit | f6c8c71cc9011061b6223b2ae43d87fa5a34be52 (patch) | |
| tree | 4618bae37d6679cd6c54bcbabd903d7be9d3bf04 /drivers/firmware/psci.c | |
| parent | 0185496a115dbdee8b2428541949217039222d84 (diff) | |
libata: transport: Remove circular dependency at free time
[ Upstream commit d85fc67dd11e9a32966140677d4d6429ca540b25 ]
Without this patch, failed probe would not free resources like irq.
ata port tdev object currently hold a reference to the ata port
object. Therefore the ata port object release function will not get
called until the ata_tport_release is called. But that would never
happen, releasing the last reference of ata port dev is done by
scsi_host_release, which is called by ata_host_release when the ata
port object is released.
The ata device objects actually do not need to explicitly hold a
reference to their real counterpart, given the transport objects are
the children of these objects and device_add() is call for each child.
We know the parent will not be deleted until we call the child's
device_del().
Reported-by: Matthew Whitehead <tedheadster@gmail.com>
Tested-by: Matthew Whitehead <tedheadster@gmail.com>
Suggested-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/firmware/psci.c')
0 files changed, 0 insertions, 0 deletions
