[PATCH v7 18/23] scsi: ufs: mediatek: Don't acquire dvfsrc-vcore twice

Peter Wang (王信友) peter.wang at mediatek.com
Wed Feb 25 02:34:04 PST 2026


On Mon, 2026-02-16 at 14:37 +0100, Nicolas Frattaroli wrote:
> @@ -519,15 +519,13 @@ static void ufs_mtk_boost_crypt(struct ufs_hba
> *hba, bool boost)
>  {
>  	struct ufs_mtk_host *host = ufshcd_get_variant(hba);
>  	struct ufs_mtk_crypt_cfg *cfg;
> -	struct regulator *reg;
>  	int volt, ret;
>  
> -	if (!ufs_mtk_is_boost_crypt_enabled(hba))
> +	if (!ufs_mtk_is_boost_crypt_enabled(hba) || !host-
> >reg_vcore)
>  		return;

If host->reg_vcore is NULL,
should ufs_mtk_is_boost_crypt_enabled be false?
So we don’t need to check both, right?


More information about the linux-arm-kernel mailing list