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

Commit 06f950f4 authored by Syam Sidhardhan's avatar Syam Sidhardhan Committed by Mauro Carvalho Chehab
Browse files

[media] lmedm04: Fix possible NULL pointer dereference



Check for (adap == NULL) has to done before accessing adap.

Signed-off-by: default avatarSyam Sidhardhan <s.syam@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 4d35435d
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -1241,10 +1241,13 @@ static int lme2510_get_stream_config(struct dvb_frontend *fe, u8 *ts_type,
		struct usb_data_stream_properties *stream)
{
	struct dvb_usb_adapter *adap = fe_to_adap(fe);
	struct dvb_usb_device *d = adap_to_d(adap);
	struct dvb_usb_device *d;

	if (adap == NULL)
		return 0;

	d = adap_to_d(adap);

	/* Turn PID filter on the fly by module option */
	if (pid_filter == 2) {
		adap->pid_filtering  = 1;