提交 c0e10260 编写于 作者: D Daniel Scheller 提交者: Mauro Carvalho Chehab

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: NDaniel Scheller <d.scheller@gmx.net>
Signed-off-by: NMauro Carvalho Chehab <mchehab@s-opensource.com>
上级 b7b9a5a9
......@@ -1935,8 +1935,10 @@ static int ddb_port_attach(struct ddb_port *port)
if (ret < 0)
break;
ret = dvb_input_attach(port->input[1]);
if (ret < 0)
if (ret < 0) {
dvb_input_detach(port->input[0]);
break;
}
port->input[0]->redi = port->input[0];
port->input[1]->redi = port->input[1];
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册