V4L/DVB (13380): sms-cards: make id unsigned in sms_get_board()

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

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
Roel Kluin 2009-11-17 19:43:40 -03:00 committed by Mauro Carvalho Chehab
parent 2b588db82d
commit 3a054627cc
2 changed files with 2 additions and 2 deletions

View file

@ -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));

View file

@ -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;