mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
scsi: ufs: fix a missing check of devm_reset_control_get
[ Upstream commit 63a06181d7 ]
devm_reset_control_get could fail, so the fix checks its return value and
passes the error code upstream in case it fails.
Signed-off-by: Kangjie Lu <kjlu@umn.edu>
Acked-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
62e79f4c6b
commit
aeea87865a
@@ -544,6 +544,10 @@ static int ufs_hisi_init_common(struct ufs_hba *hba)
|
||||
ufshcd_set_variant(hba, host);
|
||||
|
||||
host->rst = devm_reset_control_get(dev, "rst");
|
||||
if (IS_ERR(host->rst)) {
|
||||
dev_err(dev, "%s: failed to get reset control\n", __func__);
|
||||
return PTR_ERR(host->rst);
|
||||
}
|
||||
|
||||
ufs_hisi_set_pm_lvl(hba);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user