Skip to contentSkip to conversation

ASoC: tas2562: Return invalid for when bitwidth is invalid

PATCH Superseded Dan Murphy 2 participants 3 messages Feb 18, 2020

Subsystems (3)
lore
Share & tools
lore

Dan Murphy

author
#0 lore raw

PATCH 1/1 ASoC: tas2562: Return invalid for when bitwidth is invalid

If the bitwidth passed in to the set_bitwidth function is not supported then return an error.

Fixes 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
---
 scripts/conmakehash        | Bin 0 -> 13120 bytes
 scripts/sortextable        | Bin 0 -> 18040 bytes
 sound/soc/codecs/tas2562.c |   3 ++-
 3 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100755 scripts/conmakehash
 create mode 100755 scripts/sortextable
scripts/conmakehash new file binary +0 -0
new file mode 100755
index 0000000000000000000000000000000000000000..17eec37019b8ae45f42f3c82046d1a55a6f69cb3
GIT binary patch
scripts/sortextable new file binary +0 -0
new file mode 100755
index 0000000000000000000000000000000000000000..94919d95f0cd507c22297412abe299905e09d2a3
GIT binary patch
sound/soc/codecs/tas2562.c +2 -1
index 729acd874c48..5b4803a76719 100644
@@ -215,7 +215,8 @@ static int tas2562_set_bitwidth(struct tas2562_data *tas2562, int bitwidth)
 		break;
 
 	default:
-		dev_info(tas2562->dev, "Not supported params format\n");
+		dev_info(tas2562->dev, "Unsupported bitwidth format\n");
+		return -EINVAL;
 	}
 
 	ret = snd_soc_component_update_bits(tas2562->component,
Signature · 1 line
2.25.0
maintainer
#1 lore raw

scripts/conmakehash

Quoted 19 lines · Dan Murphy

If the bitwidth passed in to the set_bitwidth function is not supported then return an error.

Fixes 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
---
 scripts/conmakehash        | Bin 0 -> 13120 bytes
 scripts/sortextable        | Bin 0 -> 18040 bytes
 sound/soc/codecs/tas2562.c |   3 ++-
 3 files changed, 2 insertions(+), 1 deletion(-)
 create mode 100755 scripts/conmakehash
 create mode 100755 scripts/sortextable
scripts/conmakehash new file binary +0 -0
new file mode 100755
index 0000000000000000000000000000000000000000..17eec37019b8ae45f42f3c82046d1a55a6f69cb3
GIT binary patch

This is... fun? I'm guessing it's not intentional, it's certainly a little difficult to review. :)

author
#2 lore raw

Mark

Quoted 14 lines · Mark Brown
Quoted 13 lines · Dan Murphy

If the bitwidth passed in to the set_bitwidth function is not supported then return an error.

Fixes 29b74236bd57 ("ASoC: tas2562: Introduce the TAS2562 amplifier")
---
  scripts/conmakehash        | Bin 0 -> 13120 bytes
  scripts/sortextable        | Bin 0 -> 18040 bytes
  sound/soc/codecs/tas2562.c |   3 ++-
  3 files changed, 2 insertions(+), 1 deletion(-)

create mode 100755 scripts/conmakehash
create mode 100755 scripts/sortextable

Quoted 8 lines

scripts/conmakehash

Quoted 6 lines
scripts/conmakehash new file binary +0 -0
new file mode 100755
index 0000000000000000000000000000000000000000..17eec37019b8ae45f42f3c82046d1a55a6f69cb3
GIT binary patch

This is... fun? I'm guessing it's not intentional, it's certainly a litt

Ugh! Resending without the extra files.

Dan

Quoted 1 line

le difficult to review. :)