TencentOS-kernel/drivers/spi
Wang Li e26eccf393 spi: fsl-lpspi: Fix PM reference leak in lpspi_prepare_xfer_hardware()
[ Upstream commit a03675497970a93fcf25d81d9d92a59c2d7377a7 ]

pm_runtime_get_sync will increment pm usage counter even it failed.
Forgetting to putting operation will result in reference leak here.
Fix it by replacing it with pm_runtime_resume_and_get to keep usage
counter balanced.

Fixes: 944c01a889d9 ("spi: lpspi: enable runtime pm for lpspi")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wang Li <wangli74@huawei.com>
Link: https://lore.kernel.org/r/20210409095430.29868-1-wangli74@huawei.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-05-20 16:07:50 +08:00
..
Kconfig spi: Prevent adding devices below an unregistering controller 2021-03-16 16:34:28 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
atmel-quadspi.c spi: atmel-quadspi: Fix AHB memory accesses 2021-03-16 16:43:40 +08:00
internals.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-altera.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-armada-3700.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-at91-usart.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ath79.c spi: ath79: remove spi-master setup and cleanup assignment 2021-05-20 16:07:23 +08:00
spi-atmel.c spi: atmel: Put allocated master before return 2021-04-12 12:52:25 +08:00
spi-au1550.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-axi-spi-engine.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm-qspi.c spi: bcm-qspi: Fix use-after-free on unbind 2021-03-16 16:41:33 +08:00
spi-bcm-qspi.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm63xx-hsspi.c spi: bcm63xx-hsspi: fix missing clk_disable_unprepare() on error in bcm63xx_hsspi_resume 2021-03-16 16:42:43 +08:00
spi-bcm63xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bcm2835.c spi: bcm2835: Release the DMA channel if probe fails after dma_init 2021-03-16 16:42:06 +08:00
spi-bcm2835aux.c spi: bcm2835aux: Restore err assignment in bcm2835aux_spi_probe 2021-03-16 16:41:48 +08:00
spi-bitbang-txrx.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-bitbang.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-brcmstb-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-butterfly.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cadence.c spi: cadence: cache reference clock rate during probe 2021-04-12 12:51:31 +08:00
spi-cavium-octeon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium-thunderx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-cavium.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-clps711x.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-coldfire-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-davinci.c spi: davinci: Fix use-after-free on unbind 2021-03-16 16:43:38 +08:00
spi-dln2.c spi: dln2: Fix reference leak to master 2021-05-20 16:07:25 +08:00
spi-dw-mid.c spi: dw: Return any value retrieved from the dma_transfer callback 2021-03-16 16:29:36 +08:00
spi-dw-mmio.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-dw-pci.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-dw.c spi: dw: Return any value retrieved from the dma_transfer callback 2021-03-16 16:29:36 +08:00
spi-dw.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-efm32.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ep93xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-falcon.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-cpm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-cpm.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-dspi.c spi: spi-fsl-dspi: Fix lockup if device is shutdown during SPI transfer 2021-03-16 16:31:51 +08:00
spi-fsl-espi.c spi: fsl-espi: Only process interrupts for expected events 2021-03-16 16:37:47 +08:00
spi-fsl-lib.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-lib.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-lpspi.c spi: fsl-lpspi: Fix PM reference leak in lpspi_prepare_xfer_hardware() 2021-05-20 16:07:50 +08:00
spi-fsl-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-fsl-spi.c spi: fsl: fix use of spisel_boot signal on MPC8309 2021-03-16 16:43:38 +08:00
spi-fsl-spi.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-geni-qcom.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-gpio.c spi: gpio: Don't leak SPI master in probe error path 2021-03-16 16:43:38 +08:00
spi-img-spfi.c spi: img-spfi: fix reference leak in img_spfi_resume 2021-03-16 16:42:40 +08:00
spi-imx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-iproc-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-jcore.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-lantiq-ssc.c spi: lantiq-ssc: Fix warning by using WQ_MEM_RECLAIM 2021-03-16 16:33:37 +08:00
spi-lm70llp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-loopback-test.c spi: spi-loopback-test: Fix out-of-bounds read 2021-03-16 16:36:12 +08:00
spi-lp8841-rtc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mem.c spi: spi-mem: fix reference leak in spi_mem_access_start 2021-03-16 16:42:41 +08:00
spi-meson-spicc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-meson-spifc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc52xx-psc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc52xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mpc512x-psc.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-mt65xx.c spi: mediatek: use correct SPI_CFG2_REG MACRO 2021-03-16 16:32:30 +08:00
spi-mt7621.c spi: mt7621: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-mxic.c spi: mxic: Don't leak SPI master in probe error path 2021-03-16 16:43:38 +08:00
spi-mxs.c spi: mxs: fix reference leak in mxs_spi_probe 2021-03-16 16:42:48 +08:00
spi-npcm-fiu.c spi: npcm-fiu: Disable clock in probe error path 2021-04-12 12:51:29 +08:00
spi-npcm-pspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-nxp-fspi.c spi: spi-nxp-fspi: fix fspi panic by unexpected interrupts 2021-03-16 16:42:11 +08:00
spi-oc-tiny.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-omap-100k.c spi: omap-100k: Fix reference leak to master 2021-05-20 16:07:25 +08:00
spi-omap-uwire.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-omap2-mcspi.c spi: omap2-mcspi: Improve performance waiting for CHSTAT 2021-03-16 16:38:40 +08:00
spi-orion.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pic32-sqi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pic32.c spi: pic32: Don't leak DMA channels in probe error path 2021-03-16 16:43:38 +08:00
spi-pl022.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ppc4xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pxa2xx-dma.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-pxa2xx-pci.c spi: pxa2xx: Fix the controller numbering for Wildcat Point 2021-04-12 12:52:28 +08:00
spi-pxa2xx.c spi: pxa2xx: Fix use-after-free on unbind 2021-03-16 16:43:37 +08:00
spi-pxa2xx.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-qcom-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-qup.c spi: qup: fix PM reference leak in spi_qup_remove() 2021-05-20 16:07:25 +08:00
spi-rb4xx.c spi: rb4xx: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-rockchip.c spi: rockchip: Fix error in SPI slave pio read 2021-03-16 16:33:17 +08:00
spi-rspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c24xx-fiq.S ARM: s3c: fix fiq for clang IAS 2021-04-12 12:52:15 +08:00
spi-s3c24xx-fiq.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c24xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-s3c64xx.c spi: spi-s3c64xx: Check return values 2021-03-16 16:38:30 +08:00
spi-sc18is602.c spi: sc18is602: Don't leak SPI master in probe error path 2021-03-16 16:43:39 +08:00
spi-sh-hspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh-msiof.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh-sci.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sh.c spi: spi-sh: Fix use-after-free on unbind 2021-03-16 16:43:37 +08:00
spi-sifive.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sirf.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-mt27xx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-system-control.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-slave-time.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sprd-adi.c spi: sprd: switch the sequence of setting WDG_LOAD_LOW and _HIGH 2021-03-16 16:32:17 +08:00
spi-sprd.c spi: sprd: fix reference leak in sprd_spi_remove 2021-03-16 16:42:44 +08:00
spi-st-ssc4.c spi: st-ssc4: Fix unbalanced pm_runtime_disable() in probe error path 2021-03-16 16:43:39 +08:00
spi-stm32-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-stm32.c spi: stm32: drop devres version of spi_register_master 2021-05-20 16:07:46 +08:00
spi-sun4i.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-sun6i.c spi: spi-sun6i: sun6i_spi_transfer_one(): fix setting of clock rate 2021-03-16 16:31:59 +08:00
spi-synquacer.c spi: spi-synquacer: fix set_cs handling 2021-04-12 12:52:40 +08:00
spi-tegra20-sflash.c spi: tegra20-sflash: fix reference leak in tegra_sflash_resume 2021-03-16 16:42:43 +08:00
spi-tegra20-slink.c spi: tegra20-slink: fix reference leak in slink ops of tegra20 2021-03-16 16:42:43 +08:00
spi-tegra114.c spi: tegra114: fix reference leak in tegra spi ops 2021-03-16 16:42:43 +08:00
spi-test.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-ti-qspi.c spi: spi-ti-qspi: Free DMA resources 2021-05-20 16:07:20 +08:00
spi-tle62x0.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-topcliff-pch.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-txx9.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-uniphier.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xcomm.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xilinx.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xlp.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-xtensa-xtfpga.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-zynq-qspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi-zynqmp-gqspi.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
spi.c spi: Fix use-after-free with devm_spi_alloc_* 2021-05-20 16:07:49 +08:00
spidev.c spi: spidev: Align buffers for DMA 2021-03-16 16:33:52 +08:00