public inbox for linux-sh@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap
@ 2009-05-21 20:12 Roel Kluin
  2009-05-22  2:19 ` Paul Mundt
  0 siblings, 1 reply; 2+ messages in thread
From: Roel Kluin @ 2009-05-21 20:12 UTC (permalink / raw)
  To: linux-sh

Do not go beyond ARRAY_SIZE of pcc->keymap

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
This is against linux-next

diff --git a/drivers/misc/panasonic-laptop.c b/drivers/misc/panasonic-laptop.c
index 4a1bc64..d82d1cc 100644
--- a/drivers/misc/panasonic-laptop.c
+++ b/drivers/misc/panasonic-laptop.c
@@ -515,7 +515,7 @@ static void acpi_pcc_generate_keyinput(struct pcc_acpi *pcc)
 
 	hkey_num = result & 0xf;
 
-	if (hkey_num < 0 || hkey_num > ARRAY_SIZE(pcc->keymap)) {
+	if (hkey_num < 0 || hkey_num >= ARRAY_SIZE(pcc->keymap)) {
 		ACPI_DEBUG_PRINT((ACPI_DB_ERROR,
 				  "hotkey number out of range: %d\n",
 				  hkey_num));


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

* Re: [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap
  2009-05-21 20:12 [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap Roel Kluin
@ 2009-05-22  2:19 ` Paul Mundt
  0 siblings, 0 replies; 2+ messages in thread
From: Paul Mundt @ 2009-05-22  2:19 UTC (permalink / raw)
  To: linux-sh

On Thu, May 21, 2009 at 10:12:58PM +0200, Roel Kluin wrote:
> Do not go beyond ARRAY_SIZE of pcc->keymap
> 
> Signed-off-by: Roel Kluin <roel.kluin@gmail.com>

Presumably you meant to send this to linux-acpi or linux-kernel instead
of linux-sh ;-)

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

end of thread, other threads:[~2009-05-22  2:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-21 20:12 [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap Roel Kluin
2009-05-22  2:19 ` Paul Mundt

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