File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1867,20 +1867,20 @@ static int sdhci_msm_program_key(struct cqhci_host *cq_host,
18671867 struct sdhci_msm_host * msm_host = sdhci_pltfm_priv (pltfm_host );
18681868 union cqhci_crypto_cap_entry cap ;
18691869
1870+ if (!(cfg -> config_enable & CQHCI_CRYPTO_CONFIGURATION_ENABLE ))
1871+ return qcom_ice_evict_key (msm_host -> ice , slot );
1872+
18701873 /* Only AES-256-XTS has been tested so far. */
18711874 cap = cq_host -> crypto_cap_array [cfg -> crypto_cap_idx ];
18721875 if (cap .algorithm_id != CQHCI_CRYPTO_ALG_AES_XTS ||
18731876 cap .key_size != CQHCI_CRYPTO_KEY_SIZE_256 )
18741877 return - EINVAL ;
18751878
1876- if (cfg -> config_enable & CQHCI_CRYPTO_CONFIGURATION_ENABLE )
1877- return qcom_ice_program_key (msm_host -> ice ,
1878- QCOM_ICE_CRYPTO_ALG_AES_XTS ,
1879- QCOM_ICE_CRYPTO_KEY_SIZE_256 ,
1880- cfg -> crypto_key ,
1881- cfg -> data_unit_size , slot );
1882- else
1883- return qcom_ice_evict_key (msm_host -> ice , slot );
1879+ return qcom_ice_program_key (msm_host -> ice ,
1880+ QCOM_ICE_CRYPTO_ALG_AES_XTS ,
1881+ QCOM_ICE_CRYPTO_KEY_SIZE_256 ,
1882+ cfg -> crypto_key ,
1883+ cfg -> data_unit_size , slot );
18841884}
18851885
18861886#else /* CONFIG_MMC_CRYPTO */
You can’t perform that action at this time.
0 commit comments