Skip to content

Commit

Permalink
V4L/DVB (13380): sms-cards: make id unsigned in sms_get_board()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Roel Kluin authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 2b588db commit 3a05462
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion drivers/media/dvb/siano/sms-cards.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down
2 changes: 1 addition & 1 deletion drivers/media/dvb/siano/sms-cards.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ struct sms_board {
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;

Expand Down

0 comments on commit 3a05462

Please sign in to comment.