[PATCH] scsi: ufs: core: Simplify param_set_mcq_mode()

From: Keoseong Park
Date: Wed Apr 26 2023 - 01:22:16 EST


This function does not require the "ret" variable because it returns
only the result of param_set_bool().

Remove unnecessary "ret" variable and simplify the code.

Signed-off-by: Keoseong Park <keosung.park@xxxxxxxxxxx>
---
drivers/ufs/core/ufshcd.c | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/drivers/ufs/core/ufshcd.c b/drivers/ufs/core/ufshcd.c
index 9434328ba323..46c4ed478ad0 100644
--- a/drivers/ufs/core/ufshcd.c
+++ b/drivers/ufs/core/ufshcd.c
@@ -108,13 +108,7 @@ static bool is_mcq_supported(struct ufs_hba *hba)

static int param_set_mcq_mode(const char *val, const struct kernel_param *kp)
{
- int ret;
-
- ret = param_set_bool(val, kp);
- if (ret)
- return ret;
-
- return 0;
+ return param_set_bool(val, kp);
}

static const struct kernel_param_ops mcq_mode_ops = {
--
2.17.1