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

Commit 71682520 authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Mauro Carvalho Chehab
Browse files

[media] dib0700: fix possible NULL pointer dereference



Seems like 'adap->fe' test for NULL was meant to be before we dereference
that pointer.

Signed-off-by: default avatarMariusz Kozlowski <mk@lab.zgora.pl>
Signed-off-by: default avatarPatrick Boettcher <pboettcher@kernellabs.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent b934c20d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2440,11 +2440,11 @@ static int tfe7090pvr_frontend0_attach(struct dvb_usb_adapter *adap)
	dib0700_set_i2c_speed(adap->dev, 340);
	adap->fe = dvb_attach(dib7000p_attach, &adap->dev->i2c_adap, 0x90, &tfe7090pvr_dib7000p_config[0]);

	dib7090_slave_reset(adap->fe);

	if (adap->fe == NULL)
		return -ENODEV;

	dib7090_slave_reset(adap->fe);

	return 0;
}