WSL2-Linux-Kernel/drivers/media/usb/dvb-usb
Dongliang Mu 131ae388b8 media: dvb-usb: Fix error handling in dvb_usb_i2c_init
In dvb_usb_i2c_init, if i2c_add_adapter fails, it only prints an error
message, and then continues to set DVB_USB_STATE_I2C. This affects the
logic of dvb_usb_i2c_exit, which leads to that, the deletion of i2c_adap
even if the i2c_add_adapter fails.

Fix this by returning at the failure of i2c_add_adapter and then move
dvb_usb_i2c_exit out of the error handling code of dvb_usb_i2c_init.

Fixes: 13a79f14ab ("media: dvb-usb: Fix memory leak at error in dvb_usb_device_init()")
Signed-off-by: Dongliang Mu <mudongliangabcd@gmail.com>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-07-22 08:23:15 +02:00
..
Kconfig media: dvb_usb_pctv452e: use ISL6423 voltage regulator per default 2020-09-03 16:14:59 +02:00
Makefile media: move ttpci-eeprom to common 2021-06-02 11:16:15 +02:00
a800.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
af9005-fe.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
af9005-remote.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
af9005-script.h
af9005.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
af9005.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
az6027.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
az6027.h
cinergyT2-core.c media: cinergyt2: make properties const 2021-06-08 15:53:19 +02:00
cinergyT2-fe.c
cinergyT2.h
cxusb-analog.c media: media/usb: use vb2_video_unregister_device() 2020-08-28 15:02:52 +02:00
cxusb.c media: dvb-usb: fix wrong definition 2021-05-23 19:21:30 +02:00
cxusb.h media: cxusb: Revert "media: cxusb: add raw mode support for, Medion MD95700" 2019-06-05 15:26:40 -04:00
dib07x0.h
dib0700.h media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
dib0700_core.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
dib0700_devices.c media: dib0700: use semicolons rather than commas to separate statements 2020-11-16 10:31:07 +01:00
dibusb-common.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dibusb-mb.c media: dvb: return -EREMOTEIO on i2c transfer failure. 2020-04-21 12:55:07 +02:00
dibusb-mc-common.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dibusb-mc.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dibusb.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
digitv.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
digitv.h
dtt200u-fe.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dtt200u.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dtt200u.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
dtv5100.c media: dtv5100: fix control-request directions 2021-06-02 14:09:51 +02:00
dtv5100.h
dvb-usb-common.h media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
dvb-usb-dvb.c
dvb-usb-firmware.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
dvb-usb-i2c.c media: dvb-usb: Fix error handling in dvb_usb_i2c_init 2021-07-22 08:23:15 +02:00
dvb-usb-init.c media: dvb-usb: Fix error handling in dvb_usb_i2c_init 2021-07-22 08:23:15 +02:00
dvb-usb-remote.c
dvb-usb-urb.c media: dvb-usb/dvb-usb-urb.c: initialize actlen to 0 2019-12-13 09:17:42 +01:00
dvb-usb.h media: dvb-usb: avoid -Wempty-body warnings 2021-04-09 13:05:25 +02:00
dw2102.c media: dvb-usb: Add Hauppauge MAX S2's USB-IDs 2020-11-26 14:26:43 +01:00
dw2102.h
gp8psk.c media: gp8psk: initialize stats at power control logic 2020-11-27 07:40:21 +01:00
gp8psk.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
m920x.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
m920x.h
nova-t-usb2.c media: dvb-usb: fix uninit-value in dvb_usb_adapter_dvb_init 2021-07-22 08:22:17 +02:00
opera1.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
pctv452e.c media: dvb_usb_pctv452e: use ISL6423 voltage regulator per default 2020-09-03 16:14:59 +02:00
technisat-usb2.c media: rc: harmonize infrared durations to microseconds 2020-09-03 16:18:55 +02:00
ttusb2.c media: dvb-usb: make dvb_usb_device_properties const 2020-04-21 12:56:10 +02:00
ttusb2.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
umt-010.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
usb-urb.c
vp702x-fe.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
vp702x.c media: dvb-usb: fix uninit-value in vp702x_read_mac_addr 2021-07-22 08:22:45 +02:00
vp702x.h
vp7045-fe.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
vp7045.c media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00
vp7045.h media: docs: move driver-specific info to driver-api 2020-04-14 10:36:18 +02:00