media: ddbridge: completely tear down input resources on failure
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 17 Dec 2017 15:40:46 +0000 (10:40 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Dec 2017 12:16:53 +0000 (07:16 -0500)
commit25ac563abf3453339ca1db2bd35d42e47d9993b1
treead286f2105ec15fb3593ded6f3d0603bde68d00f
parentfac37bb124c221bde55ae77fbf8c7eff84881bda
media: ddbridge: completely tear down input resources on failure

In dvb_input_attach(), whenever a demod driver fails to initialise, or if
frontend registration fails, perform a full input/frontend teardown using
dvb_input_detach() (which can safely be done since the current init state
is tracked in the 'attached' struct member). Claimed resources thus are
freed which aren't needed when an input or a port is not functional.

While at it, in ddb_ports_detach(), detach the secondary input first. Also
increase the kernlog severity of TDA18212 errors and tuner failures in
general.

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