Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[media] cx23885-dvb: check if dvb_attach() succeded

Fix possible null dereference for Leadtek DTV 3200H
XC4000 tuner when no firmware file available.

Cc: stable@kernel.org
Signed-off-by: Miroslav Slugen <thunder.mmm@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>

authored by

Miroslav Slugen and committed by
Mauro Carvalho Chehab
a7c8aada 6c2cc5b5

+5
+5
drivers/media/video/cx23885/cx23885-dvb.c
··· 943 943 944 944 fe = dvb_attach(xc4000_attach, fe0->dvb.frontend, 945 945 &dev->i2c_bus[1].i2c_adap, &cfg); 946 + if (!fe) { 947 + printk(KERN_ERR "%s/2: xc4000 attach failed\n", 948 + dev->name); 949 + goto frontend_detach; 950 + } 946 951 } 947 952 break; 948 953 case CX23885_BOARD_TBS_6920: