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,
1867
1867
struct sdhci_msm_host * msm_host = sdhci_pltfm_priv (pltfm_host );
1868
1868
union cqhci_crypto_cap_entry cap ;
1869
1869
1870
+ if (!(cfg -> config_enable & CQHCI_CRYPTO_CONFIGURATION_ENABLE ))
1871
+ return qcom_ice_evict_key (msm_host -> ice , slot );
1872
+
1870
1873
/* Only AES-256-XTS has been tested so far. */
1871
1874
cap = cq_host -> crypto_cap_array [cfg -> crypto_cap_idx ];
1872
1875
if (cap .algorithm_id != CQHCI_CRYPTO_ALG_AES_XTS ||
1873
1876
cap .key_size != CQHCI_CRYPTO_KEY_SIZE_256 )
1874
1877
return - EINVAL ;
1875
1878
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 );
1884
1884
}
1885
1885
1886
1886
#else /* CONFIG_MMC_CRYPTO */
You can’t perform that action at this time.
0 commit comments