diff options
Diffstat (limited to 'drivers/media/video')
-rw-r--r-- | drivers/media/video/tuner-core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/video/tuner-core.c b/drivers/media/video/tuner-core.c index 2a957e2beabf..421475e0ea59 100644 --- a/drivers/media/video/tuner-core.c +++ b/drivers/media/video/tuner-core.c | |||
@@ -364,7 +364,8 @@ static void set_type(struct i2c_client *c, unsigned int type, | |||
364 | } | 364 | } |
365 | 365 | ||
366 | t->type = type; | 366 | t->type = type; |
367 | t->config = new_config; | 367 | /* prevent invalid config values */ |
368 | t->config = ((new_config >= 0) && (new_config < 256)) ? new_config : 0; | ||
368 | if (tuner_callback != NULL) { | 369 | if (tuner_callback != NULL) { |
369 | tuner_dbg("defining GPIO callback\n"); | 370 | tuner_dbg("defining GPIO callback\n"); |
370 | t->fe.callback = tuner_callback; | 371 | t->fe.callback = tuner_callback; |