Skip to content

Commit 3bf7ab4

Browse files
Mani-Sadhasivammartinkpetersen
authored andcommitted
scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key()
Currently, the function returns -EINVAL if algorithm other than AES-256-XTS is requested. But the correct error code is -EOPNOTSUPP. Fix it! Cc: Abel Vesa <abel.vesa@linaro.org> Fixes: 56541c7 ("scsi: ufs: ufs-qcom: Switch to the new ICE API") Reviewed-by: Abel Vesa <abel.vesa@linaro.org> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org> Link: https://lore.kernel.org/r/20231208065902.11006-3-manivannan.sadhasivam@linaro.org Tested-by: Andrew Halaney <ahalaney@redhat.com> # sa8775p-ride Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9caef85 commit 3bf7ab4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/ufs/host/ufs-qcom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ static int ufs_qcom_ice_program_key(struct ufs_hba *hba,
158158
cap = hba->crypto_cap_array[cfg->crypto_cap_idx];
159159
if (cap.algorithm_id != UFS_CRYPTO_ALG_AES_XTS ||
160160
cap.key_size != UFS_CRYPTO_KEY_SIZE_256)
161-
return -EINVAL;
161+
return -EOPNOTSUPP;
162162

163163
if (config_enable)
164164
return qcom_ice_program_key(host->ice,

0 commit comments

Comments
 (0)