forked from luck/tmp_suning_uos_patched
e895e067d7
commit 37c2c83ca4f1ef4b6908181ac98e18360af89b42 upstream.
The issue happens in several error paths in uniphier_spi_probe().
When either dma_get_slave_caps() or devm_spi_register_master() returns
an error code, the function forgets to decrease the refcount of both
`dma_rx` and `dma_tx` objects, which may lead to refcount leaks.
Fix it by decrementing the reference count of specific objects in
those error paths.
Signed-off-by: Xin Xiong <xiongx18@fudan.edu.cn>
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Signed-off-by: Xin Tan <tanxin.ctf@gmail.com>
Reviewed-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Fixes:
|
||
---|---|---|
.. | ||
atmel-quadspi.c | ||
internals.h | ||
Kconfig | ||
Makefile | ||
spi-altera.c | ||
spi-amd.c | ||
spi-ar934x.c | ||
spi-armada-3700.c | ||
spi-at91-usart.c | ||
spi-ath79.c | ||
spi-atmel.c | ||
spi-au1550.c | ||
spi-axi-spi-engine.c | ||
spi-bcm-qspi.c | ||
spi-bcm-qspi.h | ||
spi-bcm63xx-hsspi.c | ||
spi-bcm63xx.c | ||
spi-bcm2835.c | ||
spi-bcm2835aux.c | ||
spi-bitbang-txrx.h | ||
spi-bitbang.c | ||
spi-brcmstb-qspi.c | ||
spi-butterfly.c | ||
spi-cadence-quadspi.c | ||
spi-cadence.c | ||
spi-cavium-octeon.c | ||
spi-cavium-thunderx.c | ||
spi-cavium.c | ||
spi-cavium.h | ||
spi-clps711x.c | ||
spi-coldfire-qspi.c | ||
spi-davinci.c | ||
spi-dln2.c | ||
spi-dw-bt1.c | ||
spi-dw-core.c | ||
spi-dw-dma.c | ||
spi-dw-mmio.c | ||
spi-dw-pci.c | ||
spi-dw.h | ||
spi-efm32.c | ||
spi-ep93xx.c | ||
spi-falcon.c | ||
spi-fsi.c | ||
spi-fsl-cpm.c | ||
spi-fsl-cpm.h | ||
spi-fsl-dspi.c | ||
spi-fsl-espi.c | ||
spi-fsl-lib.c | ||
spi-fsl-lib.h | ||
spi-fsl-lpspi.c | ||
spi-fsl-qspi.c | ||
spi-fsl-spi.c | ||
spi-fsl-spi.h | ||
spi-geni-qcom.c | ||
spi-gpio.c | ||
spi-hisi-sfc-v3xx.c | ||
spi-img-spfi.c | ||
spi-imx.c | ||
spi-iproc-qspi.c | ||
spi-jcore.c | ||
spi-lantiq-ssc.c | ||
spi-lm70llp.c | ||
spi-loopback-test.c | ||
spi-lp8841-rtc.c | ||
spi-mem.c | ||
spi-meson-spicc.c | ||
spi-meson-spifc.c | ||
spi-mpc52xx-psc.c | ||
spi-mpc52xx.c | ||
spi-mpc512x-psc.c | ||
spi-mt65xx.c | ||
spi-mt7621.c | ||
spi-mtk-nor.c | ||
spi-mux.c | ||
spi-mxic.c | ||
spi-mxs.c | ||
spi-npcm-fiu.c | ||
spi-npcm-pspi.c | ||
spi-nxp-fspi.c | ||
spi-oc-tiny.c | ||
spi-omap-100k.c | ||
spi-omap-uwire.c | ||
spi-omap2-mcspi.c | ||
spi-orion.c | ||
spi-pic32-sqi.c | ||
spi-pic32.c | ||
spi-pl022.c | ||
spi-ppc4xx.c | ||
spi-pxa2xx-dma.c | ||
spi-pxa2xx-pci.c | ||
spi-pxa2xx.c | ||
spi-pxa2xx.h | ||
spi-qcom-qspi.c | ||
spi-qup.c | ||
spi-rb4xx.c | ||
spi-rockchip.c | ||
spi-rpc-if.c | ||
spi-rspi.c | ||
spi-s3c24xx-regs.h | ||
spi-s3c24xx.c | ||
spi-s3c64xx.c | ||
spi-sc18is602.c | ||
spi-sh-hspi.c | ||
spi-sh-msiof.c | ||
spi-sh-sci.c | ||
spi-sh.c | ||
spi-sifive.c | ||
spi-sirf.c | ||
spi-slave-mt27xx.c | ||
spi-slave-system-control.c | ||
spi-slave-time.c | ||
spi-sprd-adi.c | ||
spi-sprd.c | ||
spi-st-ssc4.c | ||
spi-stm32-qspi.c | ||
spi-stm32.c | ||
spi-sun4i.c | ||
spi-sun6i.c | ||
spi-synquacer.c | ||
spi-tegra20-sflash.c | ||
spi-tegra20-slink.c | ||
spi-tegra114.c | ||
spi-test.h | ||
spi-ti-qspi.c | ||
spi-tle62x0.c | ||
spi-topcliff-pch.c | ||
spi-txx9.c | ||
spi-uniphier.c | ||
spi-xcomm.c | ||
spi-xilinx.c | ||
spi-xlp.c | ||
spi-xtensa-xtfpga.c | ||
spi-zynq-qspi.c | ||
spi-zynqmp-gqspi.c | ||
spi.c | ||
spidev.c |