All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] da7210: Fencepost error in reg cache read
@ 2010-04-14 14:03 Phil Carmody
  2010-04-15  6:41 ` Kuninori Morimoto
  0 siblings, 1 reply; 3+ messages in thread
From: Phil Carmody @ 2010-04-14 14:03 UTC (permalink / raw)
  To: morimoto.kuninori; +Cc: alsa-devel, broonie

From: Phil Carmody <ext-phil.2.carmody@nokia.com>

An index equal to the array size may not be accessed.

Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
---
 sound/soc/codecs/da7210.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 366daf1..96932a8 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -165,7 +165,7 @@ static const u8 da7210_reg[] = {
 static inline u32 da7210_read_reg_cache(struct snd_soc_codec *codec, u32 reg)
 {
 	u8 *cache = codec->reg_cache;
-	BUG_ON(reg > ARRAY_SIZE(da7210_reg));
+	BUG_ON(reg >= ARRAY_SIZE(da7210_reg));
 	return cache[reg];
 }
 
-- 
1.6.0.4

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

* Re: [PATCH] da7210: Fencepost error in reg cache read
  2010-04-14 14:03 [PATCH] da7210: Fencepost error in reg cache read Phil Carmody
@ 2010-04-15  6:41 ` Kuninori Morimoto
  2010-04-20 16:37   ` Mark Brown
  0 siblings, 1 reply; 3+ messages in thread
From: Kuninori Morimoto @ 2010-04-15  6:41 UTC (permalink / raw)
  To: Phil Carmody; +Cc: alsa-devel, broonie


> From: Phil Carmody <ext-phil.2.carmody@nokia.com>
> 
> An index equal to the array size may not be accessed.
> 
> Signed-off-by: Phil Carmody <ext-phil.2.carmody@nokia.com>
> ---
>  sound/soc/codecs/da7210.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)

Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

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

* Re: [PATCH] da7210: Fencepost error in reg cache read
  2010-04-15  6:41 ` Kuninori Morimoto
@ 2010-04-20 16:37   ` Mark Brown
  0 siblings, 0 replies; 3+ messages in thread
From: Mark Brown @ 2010-04-20 16:37 UTC (permalink / raw)
  To: Kuninori Morimoto; +Cc: alsa-devel, Phil Carmody

On Thu, Apr 15, 2010 at 03:41:13PM +0900, Kuninori Morimoto wrote:

> > An index equal to the array size may not be accessed.

> Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Applied, thanks.

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

end of thread, other threads:[~2010-04-20 16:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-14 14:03 [PATCH] da7210: Fencepost error in reg cache read Phil Carmody
2010-04-15  6:41 ` Kuninori Morimoto
2010-04-20 16:37   ` Mark Brown

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.