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: Ricardo Ribalda <ribalda@chromium.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
fb007bc69a
commit
ecdcf002d1
@ -2419,7 +2419,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)
|
||||
@ -2492,8 +2497,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);
|
||||
@ -2501,7 +2508,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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user