summaryrefslogtreecommitdiff
path: root/linux/drivers
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2008-03-06 17:38:11 -0300
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-06 17:38:11 -0300
commit9ad92f018999a418ca79b7ba9701d85ee515f2a3 (patch)
tree9fd155089eff4f1c206d1af1d32e1cfae24604b0 /linux/drivers
parenta9746c66ca4fbd4c7120cad319e8df1a4c5e2d66 (diff)
downloadmediapointer-dvb-s2-9ad92f018999a418ca79b7ba9701d85ee515f2a3.tar.gz
mediapointer-dvb-s2-9ad92f018999a418ca79b7ba9701d85ee515f2a3.tar.bz2
cx88-dvb: fix an OOPS for xc3028 devices, when dvb_attach fails
From: Mauro Carvalho Chehab <mchehab@infradead.org> If dvb_attach fails, dev->dvb.frontend is NULL. This will produce an OOPS, as reported. Thanks to Vanessa Ezekowitz <vanessaezekowitz@gmail.com> CC: Vanessa Ezekowitz <vanessaezekowitz@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r--linux/drivers/media/video/cx88/cx88-dvb.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-dvb.c b/linux/drivers/media/video/cx88/cx88-dvb.c
index 12096f854..4cfff6e4a 100644
--- a/linux/drivers/media/video/cx88/cx88-dvb.c
+++ b/linux/drivers/media/video/cx88/cx88-dvb.c
@@ -468,6 +468,13 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
.video_dev = dev->core,
};
+ if (!dev->dvb.frontend) {
+ printk(KERN_ERR "%s/2: dvb frontend not attached. "
+ "Can't attach xc3028\n",
+ dev->core->name);
+ return -EINVAL;
+ }
+
fe = dvb_attach(xc2028_attach, dev->dvb.frontend, &cfg);
if (!fe) {
printk(KERN_ERR "%s/2: xc3028 attach failed\n",