Alsa-Devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [patch 1/2] ASoC: max9867: signedness bug in max9867_dai_hw_params()
@ 2016-02-25  7:48 Dan Carpenter
  2016-02-25  8:17 ` Axel Lin
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2016-02-25  7:48 UTC (permalink / raw)
  To: Liam Girdwood, anish kumar
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Axel Lin, alsa-devel,
	kernel-janitors

"value" needs to be signed for the error handling to work.

Fixes: 805d132dcbbd ('ASoC: Add max9867 codec driver')
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
index ab7a94d..4fb6fc7 100755
--- a/sound/soc/codecs/max9867.c
+++ b/sound/soc/codecs/max9867.c
@@ -180,7 +180,8 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
 {
 	struct snd_soc_codec *codec = dai->codec;
 	struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec);
-	unsigned int ni_h, ni_l, value;
+	unsigned int ni_h, ni_l;
+	int value;
 
 	value = get_ni_value(max9867->sysclk, params_rate(params));
 	if (value < 0)

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [patch 1/2] ASoC: max9867: signedness bug in max9867_dai_hw_params()
  2016-02-25  7:48 [patch 1/2] ASoC: max9867: signedness bug in max9867_dai_hw_params() Dan Carpenter
@ 2016-02-25  8:17 ` Axel Lin
  0 siblings, 0 replies; 2+ messages in thread
From: Axel Lin @ 2016-02-25  8:17 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Liam Girdwood, anish kumar, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, alsa-devel@alsa-project.org, kernel-janitors

2016-02-25 15:48 GMT+08:00 Dan Carpenter <dan.carpenter@oracle.com>:
> "value" needs to be signed for the error handling to work.
>
> Fixes: 805d132dcbbd ('ASoC: Add max9867 codec driver')
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> diff --git a/sound/soc/codecs/max9867.c b/sound/soc/codecs/max9867.c
> index ab7a94d..4fb6fc7 100755
> --- a/sound/soc/codecs/max9867.c
> +++ b/sound/soc/codecs/max9867.c
> @@ -180,7 +180,8 @@ static int max9867_dai_hw_params(struct snd_pcm_substream *substream,
>  {
>         struct snd_soc_codec *codec = dai->codec;
>         struct max9867_priv *max9867 = snd_soc_codec_get_drvdata(codec);
> -       unsigned int ni_h, ni_l, value;
> +       unsigned int ni_h, ni_l;
> +       int value;

Already fixed by
http://git.kernel.org/cgit/linux/kernel/git/broonie/sound.git/commit/?h=topic/max9867&id=127a9cbb5860a7cf15f4d4703ab0454e4603e8ac

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-25  8:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-25  7:48 [patch 1/2] ASoC: max9867: signedness bug in max9867_dai_hw_params() Dan Carpenter
2016-02-25  8:17 ` Axel Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox