]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource()
authorAsutosh Das <quic_asutoshd@quicinc.com>
Thu, 2 Mar 2023 01:42:56 +0000 (17:42 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 6 Mar 2023 23:33:12 +0000 (18:33 -0500)
commitc9507eab9fa7af7ab4c80856eeafd1481ff16f7c
tree1cf6c3fee1af43d4e4a91b57b2382ed984fd33a0
parentc8be073bd2bced20f58e65276281fc116758c7cb
scsi: ufs: mcq: qcom: Clean the return path of ufs_qcom_mcq_config_resource()

Smatch static checker reported:
drivers/ufs/host/ufs-qcom.c:1469
ufs_qcom_mcq_config_resource() info: returning a literal zero is
cleaner

Fix the above warning by returning in place instead of a jump to a label.
Also remove the usage of devm_kfree() as it's unnecessary in this function.

Fixes: c263b4ef737e ("scsi: ufs: core: mcq: Configure resource regions")
Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Asutosh Das <quic_asutoshd@quicinc.com>
Link: https://lore.kernel.org/r/3ebd2582af74b81ef7b57149f57c6a3bf0963953.1677721229.git.quic_asutoshd@quicinc.com
Reviewed-by: Bjorn Andersson <andersson@kernel.org>
Reviewed-by: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/ufs/host/ufs-qcom.c