提交 63a06181 编写于 作者: K Kangjie Lu 提交者: Martin K. Petersen

scsi: ufs: fix a missing check of devm_reset_control_get

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: NKangjie Lu <kjlu@umn.edu>
Acked-by: NAvri Altman <avri.altman@wdc.com>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 9e2a07e1
......@@ -587,6 +587,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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册