sata_rcar: handle pm_runtime_get_sync failure cases
authorNavid Emamdoost <navid.emamdoost@gmail.com>
Fri, 5 Jun 2020 03:06:43 +0000 (22:06 -0500)
committerSasha Levin <sashal@kernel.org>
Tue, 30 Jun 2020 19:37:03 +0000 (15:37 -0400)
commit4dfc238a2441668703081d5ca60d98d531efa5e4
tree11fda500dbad5e8f9d83a9666563359b99e9ef96
parent83bdf7f8b7127f3e52960ca1c690a8cd1252b9ca
sata_rcar: handle pm_runtime_get_sync failure cases

[ Upstream commit eea1238867205b9e48a67c1a63219529a73c46fd ]

Calling pm_runtime_get_sync increments the counter even in case of
failure, causing incorrect ref count. Call pm_runtime_put if
pm_runtime_get_sync fails.

Signed-off-by: Navid Emamdoost <navid.emamdoost@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ata/sata_rcar.c