summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorCezary Rojewski <cezary.rojewski@intel.com>2025-05-30 16:10:24 +0200
committerMark Brown <broonie@kernel.org>2025-06-03 12:06:04 +0100
commit065a651e2fb35209cbfe6fc5f1ababf92b66d4a4 (patch)
tree4f60c6a19556bb8c21170d7e62c3138e4b1d1fb8 /sound
parentb3f3ca04ec3f0587b92fcffa4d581e73b335701a (diff)
ASoC: Intel: avs: Simplify verification of parse_int_array() result
The function return either success or an error code, no need to involve '<' operator. Reviewed-by: Amadeusz Sławiński <amadeuszx.slawinski@linux.intel.com> Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20250530141025.2942936-9-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/intel/avs/board_selection.c2
-rw-r--r--sound/soc/intel/avs/debugfs.c6
2 files changed, 4 insertions, 4 deletions
diff --git a/sound/soc/intel/avs/board_selection.c b/sound/soc/intel/avs/board_selection.c
index 636315060eb4..673ccf162023 100644
--- a/sound/soc/intel/avs/board_selection.c
+++ b/sound/soc/intel/avs/board_selection.c
@@ -548,7 +548,7 @@ static int avs_register_i2s_test_boards(struct avs_dev *adev)
u32 *array, num_elems;
ret = parse_int_array(i2s_test, strlen(i2s_test), (int **)&array);
- if (ret < 0) {
+ if (ret) {
dev_err(adev->dev, "failed to parse i2s_test parameter\n");
return ret;
}
diff --git a/sound/soc/intel/avs/debugfs.c b/sound/soc/intel/avs/debugfs.c
index 0e826ca20619..c625cf879f17 100644
--- a/sound/soc/intel/avs/debugfs.c
+++ b/sound/soc/intel/avs/debugfs.c
@@ -144,7 +144,7 @@ static ssize_t probe_points_write(struct file *file, const char __user *from, si
int ret;
ret = parse_int_array_user(from, count, (int **)&array);
- if (ret < 0)
+ if (ret)
return ret;
num_elems = *array;
@@ -181,7 +181,7 @@ static ssize_t probe_points_disconnect_write(struct file *file, const char __use
int ret;
ret = parse_int_array_user(from, count, (int **)&array);
- if (ret < 0)
+ if (ret)
return ret;
num_elems = *array;
@@ -369,7 +369,7 @@ static ssize_t trace_control_write(struct file *file, const char __user *from, s
int ret;
ret = parse_int_array_user(from, count, (int **)&array);
- if (ret < 0)
+ if (ret)
return ret;
num_elems = *array;