Commit b6f2e063 authored by Dan Carpenter's avatar Dan Carpenter Committed by Martin K. Petersen
Browse files

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: default avatarDan Carpenter <dan.carpenter@linaro.org>
Link: https://lore.kernel.org/r/fe3b8fcd-64a7-4887-bddd-32239a88a6a3@moroto.mountain


Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fcf3fb7b
Loading
Loading
Loading
Loading
+5 −9
Original line number Diff line number Diff line
@@ -1447,16 +1447,12 @@ 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);
	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__);
		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);
}