Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f738a338 authored by Yaniv Gardi's avatar Yaniv Gardi
Browse files

scsi: ufs: remove redundant condition for power change



The removed condition is already checked inside the routine
ufshcd_change_power_mode().

Also, a minor typo is fixed.

Change-Id: Ib238ff9c4bdcd380406505d5319bd2d6c0ed6063
Signed-off-by: default avatarYaniv Gardi <ygardi@codeaurora.org>
parent 90c540cd
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -8397,15 +8397,12 @@ static int ufshcd_scale_gear(struct ufs_hba *hba, bool scale_up)
		}
	}

	/* check if the power mode needs to be changed or not? */
	if (memcmp(&new_pwr_info, &hba->pwr_info,
		   sizeof(struct ufs_pa_layer_attr)))
	ret = ufshcd_change_power_mode(hba, &new_pwr_info);

	if (ret)
		dev_err(hba->dev, "%s: failed err %d, old gear: (tx %d rx %d), new gear: (tx %d rx %d)",
			__func__, ret,
			hba->pwr_info.gear_tx, hba->pwr_info.gear_tx,
			hba->pwr_info.gear_tx, hba->pwr_info.gear_rx,
			new_pwr_info.gear_tx, new_pwr_info.gear_rx);

	return ret;