scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key()
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Fri, 8 Dec 2023 06:58:47 +0000 (12:28 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 Jan 2024 23:35:25 +0000 (15:35 -0800)
commit8f67e87e160297a4e4d8852641690fa2a30e3eef
tree54a5ba3b6bf567bc2d29c5daf86b1a67379c569b
parent95fff86aa8d2932c836b2076da3b15b9af6bd068
scsi: ufs: qcom: Fix the return value of ufs_qcom_ice_program_key()

[ Upstream commit 3bf7ab4ac30c03beecf57c052e87d5a38fb8aed6 ]

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: 56541c7c4468 ("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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/host/ufs-qcom.c