Commit 464fef1b authored by Roel Kluin's avatar Roel Kluin Committed by james toy

Make id signed so we can't get an invalid pointer when we pass a negative

id.
Signed-off-by: default avatarRoel Kluin <roel.kluin@gmail.com>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Michael Krufky <mkrufky@kernellabs.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 0a6690a3
...@@ -97,7 +97,7 @@ static struct sms_board sms_boards[] = { ...@@ -97,7 +97,7 @@ static struct sms_board sms_boards[] = {
}, },
}; };
struct sms_board *sms_get_board(int id) struct sms_board *sms_get_board(unsigned id)
{ {
BUG_ON(id >= ARRAY_SIZE(sms_boards)); BUG_ON(id >= ARRAY_SIZE(sms_boards));
......
...@@ -81,7 +81,7 @@ struct sms_board { ...@@ -81,7 +81,7 @@ struct sms_board {
int led_power, led_hi, led_lo, lna_ctrl, rf_switch; int led_power, led_hi, led_lo, lna_ctrl, rf_switch;
}; };
struct sms_board *sms_get_board(int id); struct sms_board *sms_get_board(unsigned id);
extern struct smscore_device_t *coredev; extern struct smscore_device_t *coredev;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment