media: ddbridge: improve ddb_ports_attach() failure handling
authorDaniel Scheller <d.scheller@gmx.net>
Sun, 17 Dec 2017 15:40:49 +0000 (10:40 -0500)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 19 Dec 2017 12:18:38 +0000 (07:18 -0500)
commitae49432810c5cca2143afc1445edad6582c9f270
tree1e7eb2ba9bd48696966694b5ae1f500d00b89487
parentc0e10260cc6462cbfbcbfc35eb07e4f626704a4a
media: ddbridge: improve ddb_ports_attach() failure handling

As all error handling improved quite a bit, don't stop attaching frontends
if one of them failed, since - if other tuner modules are connected to
the PCIe bridge - other hardware may just work, so don't break on a single
port failure, but rather initialise as much as possible. Ie. if there are
issues with a C2T2-equipped PCIe bridge card which has additional DuoFlex
modules connected and the bridge generally works, the DuoFlex tuners can
still work fine.

If all ports failed to initialise where connected hardware was detected on
at first, return -ENODEV though to cause this PCI device to fail and free
all allocated resources. In any case, leave a kernel log warning (or
error, even) if things went wrong.

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