aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoel Kluin <roel.kluin@gmail.com>2009-11-17 17:43:40 -0500
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-12-05 15:41:36 -0500
commit3a054627cc949c3b7bb8387543919e7d4022753a (patch)
tree5005b60b119358858d1da422471a0c622e944858
parent2b588db82d2c210e84da129a223bb403d3131abe (diff)
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>
-rw-r--r--drivers/media/dvb/siano/sms-cards.c2
-rw-r--r--drivers/media/dvb/siano/sms-cards.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/dvb/siano/sms-cards.c b/drivers/media/dvb/siano/sms-cards.c
index e21638969cd3..1067b22eb0c6 100644
--- a/drivers/media/dvb/siano/sms-cards.c
+++ b/drivers/media/dvb/siano/sms-cards.c
@@ -97,7 +97,7 @@ static struct sms_board sms_boards[] = {
97 }, 97 },
98}; 98};
99 99
100struct sms_board *sms_get_board(int id) 100struct sms_board *sms_get_board(unsigned id)
101{ 101{
102 BUG_ON(id >= ARRAY_SIZE(sms_boards)); 102 BUG_ON(id >= ARRAY_SIZE(sms_boards));
103 103
diff --git a/drivers/media/dvb/siano/sms-cards.h b/drivers/media/dvb/siano/sms-cards.h
index 38f062f6ad68..8f19fc000b46 100644
--- a/drivers/media/dvb/siano/sms-cards.h
+++ b/drivers/media/dvb/siano/sms-cards.h
@@ -81,7 +81,7 @@ struct sms_board {
81 int led_power, led_hi, led_lo, lna_ctrl, rf_switch; 81 int led_power, led_hi, led_lo, lna_ctrl, rf_switch;
82}; 82};
83 83
84struct sms_board *sms_get_board(int id); 84struct sms_board *sms_get_board(unsigned id);
85 85
86extern struct smscore_device_t *coredev; 86extern struct smscore_device_t *coredev;
87 87