summaryrefslogtreecommitdiff
path: root/drivers/ufs
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@linaro.org>2023-10-02 10:03:35 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2023-10-09 21:53:45 -0400
commitb6f2e063017b92491976a40c32a0e4b3c13e7d2f (patch)
treebaf0cae01882dae8e56b1e057b3296a0dc7c2452 /drivers/ufs
parentfcf3fb7bd50c08e1bef8de0d36e62e53b58ceb8a (diff)
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>
Diffstat (limited to 'drivers/ufs')
-rw-r--r--drivers/ufs/host/ufs-qcom.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/ufs/host/ufs-qcom.c b/drivers/ufs/host/ufs-qcom.c
index 2128db0293b5..96cb8b5b4e66 100644
--- a/drivers/ufs/host/ufs-qcom.c
+++ b/drivers/ufs/host/ufs-qcom.c
@@ -1447,15 +1447,11 @@ static int ufs_qcom_clk_scale_up_pre_change(struct ufs_hba *hba)
if (!ufs_qcom_cap_qunipro(host))
return 0;
- if (attr) {
- ret = ufs_qcom_cfg_timers(hba, attr->gear_rx,
- attr->pwr_rx, attr->hs_rate,
- false, true);
- if (ret) {
- dev_err(hba->dev, "%s ufs cfg timer failed\n",
- __func__);
- return ret;
- }
+ ret = ufs_qcom_cfg_timers(hba, attr->gear_rx, attr->pwr_rx,
+ attr->hs_rate, false, true);
+ if (ret) {
+ dev_err(hba->dev, "%s ufs cfg timer failed\n", __func__);
+ return ret;
}
/* set unipro core clock attributes and clear clock divider */
return ufs_qcom_set_core_clk_ctrl(hba, true);