media: ddbridge: detach first input if the second one failed to init
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 17 Dec 2017 15:40:48 +0000 (10:40 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Dec 2017 12:17:50 +0000 (07:17 -0500)
commitc0e10260cc6462cbfbcbfc35eb07e4f626704a4a
treef0a5951ace93d4139be911f044e16ad60740bd5a
parentb7b9a5a93b7d859dacc3dff312346b4ab23fa60d
media: ddbridge: detach first input if the second one failed to init

In ddb_ports_attach(), if the second input of a dual tuner failed to
initialise, the first one can be detached (and resources be freed) as
this will be counted as the whole port having failed to initialise,
thus the first one won't be used anyway.

Signed-off-by: Daniel Scheller <d.scheller@gmx.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/ddbridge/ddbridge-core.c