Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 01732eba authored by Jonathan Nieder's avatar Jonathan Nieder Committed by Mauro Carvalho Chehab
Browse files

[media] flexcop: handle errors from dvb_net_init



Bail out if dvb_net_init encounters an error (for example an
out-of-memory condition), now that it reports them.

[mchehab@redhat.com: CodingStyle fix: don't use  "if ((ret = foo()) < 0)"]
Signed-off-by: default avatarJonathan Nieder <jrnieder@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 42702de2
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -117,11 +117,17 @@ static int flexcop_dvb_init(struct flexcop_device *fc)
		goto err_connect_frontend;
	}

	dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx);
	ret = dvb_net_init(&fc->dvb_adapter, &fc->dvbnet, &fc->demux.dmx);
	if (ret < 0) {
		err("dvb_net_init failed: error %d", ret);
		goto err_net;
	}

	fc->init_state |= FC_STATE_DVB_INIT;
	return 0;

err_net:
	fc->demux.dmx.disconnect_frontend(&fc->demux.dmx);
err_connect_frontend:
	fc->demux.dmx.remove_frontend(&fc->demux.dmx, &fc->mem_frontend);
err_dmx_add_mem_frontend: