Skip to content

Commit a7c8aad

Browse files
Miroslav SlugenMauro Carvalho Chehab
authored andcommitted
[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>
1 parent 6c2cc5b commit a7c8aad

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
@@ -943,6 +943,11 @@ static int dvb_register(struct cx23885_tsport *port)
943943

944944
fe = dvb_attach(xc4000_attach, fe0->dvb.frontend,
945945
&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+
}
946951
}
947952
break;
948953
case CX23885_BOARD_TBS_6920:

0 commit comments

Comments
 (0)