]> git.baikalelectronics.ru Git - kernel.git/commit
media: ddbridge: improve error handling logic on fe attach failures
authorDaniel Scheller <d.scheller@gmx.net>
Wed, 6 Dec 2017 17:59:14 +0000 (12:59 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 13 Dec 2017 15:19:41 +0000 (10:19 -0500)
commit661435c3cb0c9df3450f420b4bd12903d1f15d1b
tree8f2fa43f8f2d90c6a8b9d01264a3f5a415fe4625
parent6fcee7af1808126ba4386bb46994b550de3d22ff
media: ddbridge: improve error handling logic on fe attach failures

This change makes sure that demod frontends are always detached whenever
a tuner frontend attach failed. Achieve this by moving the detach-on-
failure logic at the end of dvb_input_attach(), and adding a goto to this
block on every tuner attach failure case, so if an error occurs, there are
no stray attached frontends left. As a side effect, this removes some
duplicated code.

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