[media] cx23885-dvb: Fix some issues at the DVB error handling
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Thu, 30 Oct 2014 14:15:53 +0000 (11:15 -0300)
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>
Mon, 3 Nov 2014 18:21:29 +0000 (16:21 -0200)
commited3da2bf2e1800e7c6e31e7d31917dacce599458
tree08ff8590c1407f6acd457b06b08fcf7ca1a25849
parent61b103e85a87a5106833fea7b9a21637d9ba2d47
[media] cx23885-dvb: Fix some issues at the DVB error handling

X-Patchwork-Delegate: m.chehab@samsung.com
As pointed by smatch:
drivers/media/pci/cx23885/cx23885-dvb.c:1066 dvb_register() error: we previously assumed 'fe0->dvb.frontend' could be null (see line 1060)
drivers/media/pci/cx23885/cx23885-dvb.c:1990 cx23885_dvb_register() error: we previously assumed 'fe0' could be null (see line 1975)

What happens is that the error handling logic when a frontend
register fails sometimes keep doing the work, as if it didn't
fail.

This could potentially cause an OOPS. So, simplify the logic
a little bit and return an error if frontend fails before
trying to setup VB2 queue.

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
drivers/media/pci/cx23885/cx23885-dvb.c