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

Commit 5a4faee2 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab
Browse files

[media] ngene: preventing dereferencing a NULL pointer



As reported by smatch:
	drivers/media/pci/ngene/ngene-core.c:1529 init_channel() error: we previously assumed 'chan->fe' could be null (see line 1521)

Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@osg.samsung.com>
parent f8781a08
Loading
Loading
Loading
Loading
+6 −4
Original line number Diff line number Diff line
@@ -1526,11 +1526,13 @@ static int init_channel(struct ngene_channel *chan)
	if (chan->fe2) {
		if (dvb_register_frontend(adapter, chan->fe2) < 0)
			goto err;
		if (chan->fe) {
			chan->fe2->tuner_priv = chan->fe->tuner_priv;
			memcpy(&chan->fe2->ops.tuner_ops,
			       &chan->fe->ops.tuner_ops,
			       sizeof(struct dvb_tuner_ops));
		}
	}

	if (chan->has_demux) {
		ret = my_dvb_dmx_ts_card_init(dvbdemux, "SW demux",