projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ec83a0b
)
ASoC: codecs: aw88395: Fix some error codes
author
Dan Carpenter
<dan.carpenter@linaro.org>
Wed, 13 Sep 2023 08:18:22 +0000
(11:18 +0300)
committer
Mark Brown
<broonie@kernel.org>
Wed, 13 Sep 2023 12:58:24 +0000
(13:58 +0100)
These error paths should return -EINVAL instead of success.
Fixes: 7f4ec77802aa ("ASoC: codecs: Add code for bin parsing compatible with aw88261")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Link:
https://lore.kernel.org/r/81476e78-05c2-4656-b754-f314c7ccdb81@moroto.mountain
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/aw88395/aw88395_lib.c
patch
|
blob
|
history
diff --git
a/sound/soc/codecs/aw88395/aw88395_lib.c
b/sound/soc/codecs/aw88395/aw88395_lib.c
index 8ee1baa0326911d2ae39a5fa047e73a5e7aa7212..87dd0ccade4ce754b9962a4f931e2a80c2dc0ee8 100644
(file)
--- a/
sound/soc/codecs/aw88395/aw88395_lib.c
+++ b/
sound/soc/codecs/aw88395/aw88395_lib.c
@@
-452,11
+452,13
@@
static int aw_dev_parse_reg_bin_with_hdr(struct aw_device *aw_dev,
if ((aw_bin->all_bin_parse_num != 1) ||
(aw_bin->header_info[0].bin_data_type != DATA_TYPE_REGISTER)) {
dev_err(aw_dev->dev, "bin num or type error");
+ ret = -EINVAL;
goto parse_bin_failed;
}
if (aw_bin->header_info[0].valid_data_len % 4) {
dev_err(aw_dev->dev, "bin data len get error!");
+ ret = -EINVAL;
goto parse_bin_failed;
}