* [PATCH] ASoC: Keep index within stac9766_reg[]
@ 2009-07-13 0:17 Roel Kluin
0 siblings, 0 replies; 3+ messages in thread
From: Roel Kluin @ 2009-07-13 0:17 UTC (permalink / raw)
To: broonie, alsa-devel, Andrew Morton
Keep index within stac9766_reg[]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 8ad4b7b..11f467e 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -149,7 +149,7 @@ static int stac9766_ac97_write(struct snd_soc_codec *codec, unsigned int reg,
stac9766_ac97_write(codec, AC97_INT_PAGING, 1);
return 0;
}
- if (reg / 2 > ARRAY_SIZE(stac9766_reg))
+ if (reg / 2 >= ARRAY_SIZE(stac9766_reg))
return -EIO;
soc_ac97_ops.write(codec->ac97, reg, val);
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH] ASoC: Keep index within stac9766_reg[]
@ 2009-07-13 0:20 Roel Kluin
2009-07-13 9:32 ` Mark Brown
0 siblings, 1 reply; 3+ messages in thread
From: Roel Kluin @ 2009-07-13 0:20 UTC (permalink / raw)
To: broonie, alsa-devel, Andrew Morton
Keep index within stac9766_reg[]
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
please ignore the patch lacking the second hunk
diff --git a/sound/soc/codecs/stac9766.c b/sound/soc/codecs/stac9766.c
index 8ad4b7b..befc648 100644
--- a/sound/soc/codecs/stac9766.c
+++ b/sound/soc/codecs/stac9766.c
@@ -149,7 +149,7 @@ static int stac9766_ac97_write(struct snd_soc_codec *codec, unsigned int reg,
stac9766_ac97_write(codec, AC97_INT_PAGING, 1);
return 0;
}
- if (reg / 2 > ARRAY_SIZE(stac9766_reg))
+ if (reg / 2 >= ARRAY_SIZE(stac9766_reg))
return -EIO;
soc_ac97_ops.write(codec->ac97, reg, val);
@@ -168,7 +168,7 @@ static unsigned int stac9766_ac97_read(struct snd_soc_codec *codec,
stac9766_ac97_write(codec, AC97_INT_PAGING, 1);
return val;
}
- if (reg / 2 > ARRAY_SIZE(stac9766_reg))
+ if (reg / 2 >= ARRAY_SIZE(stac9766_reg))
return -EIO;
if (reg == AC97_RESET || reg == AC97_GPIO_STATUS ||
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] ASoC: Keep index within stac9766_reg[]
2009-07-13 0:20 [PATCH] ASoC: Keep index within stac9766_reg[] Roel Kluin
@ 2009-07-13 9:32 ` Mark Brown
0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2009-07-13 9:32 UTC (permalink / raw)
To: Roel Kluin; +Cc: alsa-devel, Andrew Morton
On Mon, Jul 13, 2009 at 02:20:10AM +0200, Roel Kluin wrote:
> Keep index within stac9766_reg[]
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Applied, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-07-13 9:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-13 0:20 [PATCH] ASoC: Keep index within stac9766_reg[] Roel Kluin
2009-07-13 9:32 ` Mark Brown
-- strict thread matches above, loose matches on Subject: below --
2009-07-13 0:17 Roel Kluin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.