Skip to content

Commit 60dfee8

Browse files
Miroslav Slugengregkh
authored andcommitted
cx23885-dvb: check if dvb_attach() succeded
commit a7c8aad upstream. Fix possible null dereference for Leadtek DTV 3200H XC4000 tuner when no firmware file available. Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1 parent c893fe0 commit 60dfee8

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

‎drivers/media/video/cx23885/cx23885-dvb.c‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,11 @@ static int dvb_register(struct cx23885_tsport *port)
940940

941941
fe = dvb_attach(xc4000_attach, fe0->dvb.frontend,
942942
&dev->i2c_bus[1].i2c_adap, &cfg);
943+
if (!fe) {
944+
printk(KERN_ERR "%s/2: xc4000 attach failed\n",
945+
dev->name);
946+
goto frontend_detach;
947+
}
943948
}
944949
break;
945950
case CX23885_BOARD_TBS_6920:

0 commit comments

Comments
 (0)