]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: ufs: qcom: Remove unnecessary check
authorDan Carpenter <dan.carpenter@linaro.org>
Mon, 2 Oct 2023 07:03:35 +0000 (10:03 +0300)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Oct 2023 01:53:45 +0000 (21:53 -0400)
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>
drivers/ufs/host/ufs-qcom.c

index 2128db0293b532d0926922f632ec3341f8997f77..96cb8b5b4e66f5c5c7eb23ccf8cdeccf7c8da233 100644 (file)
@@ -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);