From: Roel Kluin <roel.kluin@gmail.com>
To: linux-sh@vger.kernel.org
Subject: [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap
Date: Thu, 21 May 2009 20:12:58 +0000 [thread overview]
Message-ID: <4A15B5CA.9060907@gmail.com> (raw)
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));
next reply other threads:[~2009-05-21 20:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-21 20:12 Roel Kluin [this message]
2009-05-22 2:19 ` [PATCH] panasonic-laptop: beyond ARRAY_SIZE of pcc->keymap Paul Mundt
2009-05-22 11:56 ` Roel Kluin
2009-05-27 22:14 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4A15B5CA.9060907@gmail.com \
--to=roel.kluin@gmail.com \
--cc=linux-sh@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.