Skip to content

Commit cf0ba44

Browse files
Dan Carpenterbroonie
authored andcommitted
ASoC: codecs: aw88395: Fix some error codes
These error paths should return -EINVAL instead of success. Fixes: 7f4ec77 ("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>
1 parent ec83a0b commit cf0ba44

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sound/soc/codecs/aw88395/aw88395_lib.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,11 +452,13 @@ static int aw_dev_parse_reg_bin_with_hdr(struct aw_device *aw_dev,
452452
if ((aw_bin->all_bin_parse_num != 1) ||
453453
(aw_bin->header_info[0].bin_data_type != DATA_TYPE_REGISTER)) {
454454
dev_err(aw_dev->dev, "bin num or type error");
455+
ret = -EINVAL;
455456
goto parse_bin_failed;
456457
}
457458

458459
if (aw_bin->header_info[0].valid_data_len % 4) {
459460
dev_err(aw_dev->dev, "bin data len get error!");
461+
ret = -EINVAL;
460462
goto parse_bin_failed;
461463
}
462464

0 commit comments

Comments
 (0)