linux-stable/drivers/i2c/busses
Heiner Kallweit 43fe5dc9fa i2c: i801: Avoid potential double call to gpiod_remove_lookup_table
commit ceb013b2d9 upstream.

If registering the platform device fails, the lookup table is
removed in the error path. On module removal we would try to
remove the lookup table again. Fix this by setting priv->lookup
only if registering the platform device was successful.
In addition free the memory allocated for the lookup table in
the error path.

Fixes: d308dfbf62 ("i2c: mux/i801: Switch to use descriptor passing")
Cc: stable@vger.kernel.org
Reviewed-by: Andi Shyti <andi.shyti@kernel.org>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: Andi Shyti <andi.shyti@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-03 15:19:43 +02:00
..
i2c-acorn.c
i2c-ali15x3.c
i2c-ali1535.c
i2c-ali1563.c
i2c-altera.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-amd-mp2-pci.c i2c: amd-mp2: Remove useless DMA-32 fallback configuration 2022-02-07 15:32:14 +01:00
i2c-amd-mp2-plat.c i2c: amd-mp2-plat: Refactor _UID handling to use acpi_dev_uid_to_integer() 2022-09-19 18:34:42 +02:00
i2c-amd-mp2.h
i2c-amd756-s4882.c
i2c-amd756.c
i2c-amd8111.c
i2c-aspeed.c i2c: aspeed: Handle the coalesced stop conditions with the start conditions. 2024-01-01 12:38:59 +00:00
i2c-at91-core.c
i2c-at91-master.c i2c: at91: Initialize dma_buf in at91_twi_xfer() 2022-05-14 15:41:16 +02:00
i2c-at91-slave.c
i2c-at91.h
i2c-au1550.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-axxia.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-bcm-iproc.c i2c: iproc: handle invalid slave state 2023-11-20 11:52:17 +01:00
i2c-bcm-kona.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-bcm2835.c Merge tag 'irq-api-2022-02-21' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into i2c/for-mergewindow 2022-02-23 14:14:15 +01:00
i2c-brcmstb.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-cadence.c i2c: cadence: cdns_i2c_master_xfer(): Fix runtime PM leak on error path 2023-05-11 23:03:30 +09:00
i2c-cbus-gpio.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-ccgx-ucsi.c i2c: Introduce common module to instantiate CCGx UCSI 2022-02-15 10:04:53 +01:00
i2c-ccgx-ucsi.h i2c: Introduce common module to instantiate CCGx UCSI 2022-02-15 10:04:53 +01:00
i2c-cht-wc.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-cp2615.c
i2c-cpm.c
i2c-cros-ec-tunnel.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-davinci.c i2c: davinci: fix PM disable depth imbalance in davinci_i2c_probe 2022-10-02 00:46:42 +02:00
i2c-designware-amdpsp.c i2c: designware: Introduce semaphore reservation timer to AMDPSP driver 2022-08-20 08:29:04 +02:00
i2c-designware-baytrail.c i2c: designware: Add AMD PSP I2C bus support 2022-02-11 15:38:23 +01:00
i2c-designware-common.c i2c: designware: Fix corrupted memory seen in the ISR 2023-12-13 18:39:03 +01:00
i2c-designware-core.h i2c: designware: fix i2c_dw_clk_rate() return size to be u32 2023-03-10 09:33:29 +01:00
i2c-designware-master.c i2c: designware: Disable TX_EMPTY irq while waiting for block length byte 2023-11-28 17:07:18 +00:00
i2c-designware-pcidrv.c usb: typec: ucsi: Mark dGPUs as DEVICE scope 2023-07-19 16:22:12 +02:00
i2c-designware-platdrv.c i2c: designware: Fix unbalanced suspended flag 2023-02-01 08:34:42 +01:00
i2c-designware-slave.c
i2c-digicolor.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-diolan-u2c.c
i2c-dln2.c
i2c-eg20t.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-elektor.c
i2c-emev2.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-exynos5.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-fsi.c
i2c-gpio.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-highlander.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-hisi.c i2c: hisi: Only handle the interrupt of the driver's transfer 2023-08-23 17:52:30 +02:00
i2c-hix5hd2.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-hydra.c
i2c-i801.c i2c: i801: Avoid potential double call to gpiod_remove_lookup_table 2024-04-03 15:19:43 +02:00
i2c-ibm_iic.c i2c: Delete error messages for failed memory allocations 2023-08-03 10:23:49 +02:00
i2c-ibm_iic.h
i2c-icy.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-img-scb.c
i2c-imx-lpi2c.c i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle 2023-06-28 11:12:40 +02:00
i2c-imx.c i2c: imx: when being a target, mark the last read as processed 2024-03-01 13:26:38 +01:00
i2c-iop3xx.c
i2c-iop3xx.h
i2c-isch.c
i2c-ismt.c i2c: ismt: Fix an out-of-bounds bug in ismt_access() 2022-12-31 13:32:42 +01:00
i2c-jz4780.c
i2c-kempld.c i2c: kempld: Support ACPI I2C device declaration 2022-08-11 23:02:51 +02:00
i2c-lpc2k.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-mchp-pci1xxxx.c i2c: mchp-pci1xxxx: Avoid cast to incompatible function type 2023-06-28 11:12:39 +02:00
i2c-meson.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-microchip-corei2c.c i2c: microchip-corei2c: fix erroneous late ack send 2022-08-11 14:28:56 +02:00
i2c-mlxbf.c i2c: mlxbf: depend on ACPI; clean away ifdeffage 2022-10-21 07:59:35 +02:00
i2c-mlxcpld.c i2c: fix spelling typos in comments 2022-10-20 23:09:10 +02:00
i2c-mpc.c powerpc/mpc5xxx: Switch mpc5xxx_get_bus_frequency() to use fwnode 2022-06-22 12:51:49 +10:00
i2c-mt65xx.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-mt7621.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-mv64xxx.c i2c: mv64xxx: Fix reading invalid status value in atomic mode 2023-06-14 11:15:31 +02:00
i2c-mxs.c i2c: mxs: ensure that DMA buffers are safe for DMA 2023-03-30 12:49:03 +02:00
i2c-nforce2-s4985.c
i2c-nforce2.c
i2c-nomadik.c i2c: nomadik: Remove a useless call in the remove function 2023-08-03 10:23:50 +02:00
i2c-npcm7xx.c i2c: npcm7xx: Fix callback completion ordering 2023-10-06 14:56:50 +02:00
i2c-nvidia-gpu.c usb: typec: ucsi: Mark dGPUs as DEVICE scope 2023-07-19 16:22:12 +02:00
i2c-ocores.c i2c: ocores: generate stop condition after timeout in polling mode 2023-04-20 12:35:14 +02:00
i2c-octeon-core.c
i2c-octeon-core.h
i2c-octeon-platdrv.c
i2c-omap.c i2c: omap: Fix standard mode false ACK readings 2023-05-11 23:03:04 +09:00
i2c-opal.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-owl.c
i2c-parport.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-pasemi-core.c i2c: pasemi: split driver into two separate modules 2024-02-23 09:12:35 +01:00
i2c-pasemi-core.h i2c: pasemi: Set enable bit for Apple variant 2021-10-11 11:45:56 +02:00
i2c-pasemi-pci.c i2c: pasemi: Drop I2C classes from platform driver variant 2022-02-15 10:28:34 +01:00
i2c-pasemi-platform.c i2c: pasemi: Add Apple platform driver 2021-10-11 11:45:48 +02:00
i2c-pca-isa.c
i2c-pca-platform.c
i2c-piix4.c i2c: piix4: Fix adapter not be removed in piix4_remove() 2022-11-01 13:09:33 +01:00
i2c-pnx.c
i2c-powermac.c i2c: powermac: Prepare cleanup of powerpc's asm/prom.h 2022-05-04 22:32:45 +02:00
i2c-pxa-pci.c i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe 2022-12-31 13:32:42 +01:00
i2c-pxa.c Revert "i2c: pxa: move to generic GPIO recovery" 2023-11-28 17:07:18 +00:00
i2c-qcom-cci.c i2c: qcom-cci: Fix ordering of pm_runtime_xx and i2c_add_adapter 2022-10-19 21:36:50 +02:00
i2c-qcom-geni.c i2c: qcom-geni: Correct I2C TRE sequence 2024-02-23 09:12:35 +01:00
i2c-qup.c i2c: qup: Add missing unwind goto in qup_i2c_probe() 2023-07-19 16:22:08 +02:00
i2c-rcar.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-riic.c i2c: riic: Use devm_platform_ioremap_resource() 2022-09-17 20:35:34 +02:00
i2c-rk3x.c i2c: rk3x: fix potential spinlock recursion on poll 2024-01-20 11:50:09 +01:00
i2c-robotfuzz-osif.c
i2c-rzv2m.c i2c: Add Renesas RZ/V2M controller 2022-07-22 18:46:41 +02:00
i2c-s3c2410.c i2c: s3c24xx: fix transferring more than one message in polling mode 2024-01-25 15:27:52 -08:00
i2c-scmi.c i2c: scmi: Convert to be a platform driver 2022-09-16 20:44:08 +01:00
i2c-sh7760.c i2c: Improve size determinations 2023-08-03 10:23:49 +02:00
i2c-sh_mobile.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-sibyte.c
i2c-simtec.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-sis96x.c
i2c-sis630.c i2c: fix spelling typos in comments 2022-10-20 23:09:10 +02:00
i2c-sis5595.c
i2c-sprd.c i2c: sprd: Delete i2c adapter in .remove's error path 2023-06-14 11:15:32 +02:00
i2c-st.c
i2c-stm32.c
i2c-stm32.h
i2c-stm32f4.c
i2c-stm32f7.c i2c: stm32f7: Fix PEC handling in case of SMBUS transfers 2023-11-02 09:35:30 +01:00
i2c-sun6i-p2wi.c i2c: sun6i-p2wi: Prevent potential division by zero 2023-11-28 17:07:01 +00:00
i2c-synquacer.c
i2c-taos-evm.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-tegra-bpmp.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-tegra.c i2c: tegra: Fix i2c-tegra DMA config option processing 2023-08-23 17:52:30 +02:00
i2c-thunderx-pcidrv.c drivers: i2c: thunderx: Allow driver to work with ACPI defined TWSI controllers 2022-05-21 13:41:28 +02:00
i2c-tiny-usb.c i2c: Delete error messages for failed memory allocations 2023-08-03 10:23:49 +02:00
i2c-uniphier-f.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-uniphier.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-versatile.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-via.c
i2c-viapro.c
i2c-viperboard.c
i2c-virtio.c virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
i2c-wmt.c i2c: move drivers from strlcpy to strscpy 2022-08-11 23:02:51 +02:00
i2c-xgene-slimpro.c i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer() 2023-03-30 12:49:30 +02:00
i2c-xiic.c i2c: xiic: Correct return value check for xiic_reinit() 2023-10-06 14:56:43 +02:00
i2c-xlp9xx.c i2c: Remove Netlogic XLP variant 2021-11-23 10:00:12 +01:00
Kconfig i2c: mlxbf: depend on ACPI; clean away ifdeffage 2022-10-21 07:59:35 +02:00
Makefile i2c: pasemi: split driver into two separate modules 2024-02-23 09:12:35 +01:00
scx200_acb.c