Skip to content

Commit b6f2e06

Browse files
Dan Carpentermartinkpetersen
authored andcommitted
scsi: ufs: qcom: Remove unnecessary check
The "attr" pointer points to an offset into the "host" struct so it can't be NULL. Delete the if statement and pull the code in a tab. Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org> Link: https://lore.kernel.org/r/fe3b8fcd-64a7-4887-bddd-32239a88a6a3@moroto.mountain Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent fcf3fb7 commit b6f2e06

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

drivers/ufs/host/ufs-qcom.c

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1447,15 +1447,11 @@ static int ufs_qcom_clk_scale_up_pre_change(struct ufs_hba *hba)
14471447
if (!ufs_qcom_cap_qunipro(host))
14481448
return 0;
14491449

1450-
if (attr) {
1451-
ret = ufs_qcom_cfg_timers(hba, attr->gear_rx,
1452-
attr->pwr_rx, attr->hs_rate,
1453-
false, true);
1454-
if (ret) {
1455-
dev_err(hba->dev, "%s ufs cfg timer failed\n",
1456-
__func__);
1457-
return ret;
1458-
}
1450+
ret = ufs_qcom_cfg_timers(hba, attr->gear_rx, attr->pwr_rx,
1451+
attr->hs_rate, false, true);
1452+
if (ret) {
1453+
dev_err(hba->dev, "%s ufs cfg timer failed\n", __func__);
1454+
return ret;
14591455
}
14601456
/* set unipro core clock attributes and clear clock divider */
14611457
return ufs_qcom_set_core_clk_ctrl(hba, true);

0 commit comments

Comments
 (0)