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

Commit 21337567 authored by Ricardo Ribalda's avatar Ricardo Ribalda Committed by Greg Kroah-Hartman
Browse files

media: dvb-usb: dib0700_devices: Add missing release_firmware()



[ Upstream commit 4b267c23ee064bd24c6933df0588ad1b6e111145 ]

Add missing release_firmware on the error paths.

drivers/media/usb/dvb-usb/dib0700_devices.c:2415 stk9090m_frontend_attach() warn: 'state->frontend_firmware' from request_firmware() not released on lines: 2415.
drivers/media/usb/dvb-usb/dib0700_devices.c:2497 nim9090md_frontend_attach() warn: 'state->frontend_firmware' from request_firmware() not released on lines: 2489,2497.

Signed-off-by: default avatarRicardo Ribalda <ribalda@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 86b76945
Loading
Loading
Loading
Loading
+15 −3
Original line number Diff line number Diff line
@@ -2427,7 +2427,12 @@ static int stk9090m_frontend_attach(struct dvb_usb_adapter *adap)

	adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &stk9090m_config);

	return adap->fe_adap[0].fe == NULL ?  -ENODEV : 0;
	if (!adap->fe_adap[0].fe) {
		release_firmware(state->frontend_firmware);
		return -ENODEV;
	}

	return 0;
}

static int dib9090_tuner_attach(struct dvb_usb_adapter *adap)
@@ -2500,8 +2505,10 @@ static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap)
	dib9000_i2c_enumeration(&adap->dev->i2c_adap, 1, 0x20, 0x80);
	adap->fe_adap[0].fe = dvb_attach(dib9000_attach, &adap->dev->i2c_adap, 0x80, &nim9090md_config[0]);

	if (adap->fe_adap[0].fe == NULL)
	if (!adap->fe_adap[0].fe) {
		release_firmware(state->frontend_firmware);
		return -ENODEV;
	}

	i2c = dib9000_get_i2c_master(adap->fe_adap[0].fe, DIBX000_I2C_INTERFACE_GPIO_3_4, 0);
	dib9000_i2c_enumeration(i2c, 1, 0x12, 0x82);
@@ -2509,7 +2516,12 @@ static int nim9090md_frontend_attach(struct dvb_usb_adapter *adap)
	fe_slave = dvb_attach(dib9000_attach, i2c, 0x82, &nim9090md_config[1]);
	dib9000_set_slave_frontend(adap->fe_adap[0].fe, fe_slave);

	return fe_slave == NULL ?  -ENODEV : 0;
	if (!fe_slave) {
		release_firmware(state->frontend_firmware);
		return -ENODEV;
	}

	return 0;
}

static int nim9090md_tuner_attach(struct dvb_usb_adapter *adap)