aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/tuner-simple.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/tuner-simple.c')
-rw-r--r--drivers/media/video/tuner-simple.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/tuner-simple.c b/drivers/media/video/tuner-simple.c
index 85556d44c8ab..d3362703e258 100644
--- a/drivers/media/video/tuner-simple.c
+++ b/drivers/media/video/tuner-simple.c
@@ -688,6 +688,12 @@ struct dvb_frontend *simple_tuner_attach(struct dvb_frontend *fe,
688{ 688{
689 struct tuner_simple_priv *priv = NULL; 689 struct tuner_simple_priv *priv = NULL;
690 690
691 if (type >= tuner_count) {
692 printk(KERN_WARNING "%s: invalid tuner type: %d (max: %d)\n",
693 __FUNCTION__, type, tuner_count-1);
694 return NULL;
695 }
696
691 priv = kzalloc(sizeof(struct tuner_simple_priv), GFP_KERNEL); 697 priv = kzalloc(sizeof(struct tuner_simple_priv), GFP_KERNEL);
692 if (priv == NULL) 698 if (priv == NULL)
693 return NULL; 699 return NULL;