linux-stable/drivers/dma
Christophe JAILLET c2ac57c628 dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
[ Upstream commit 83c761f568 ]

If pxad_alloc_desc() fails on the first dma_pool_alloc() call, then
sw_desc->nb_desc is zero.
In such a case pxad_free_desc() is called and it will BUG_ON().

Remove this erroneous BUG_ON().

It is also useless, because if "sw_desc->nb_desc == 0", then, on the first
iteration of the for loop, i is -1 and the loop will not be executed.
(both i and sw_desc->nb_desc are 'int')

Fixes: a57e16cf03 ("dmaengine: pxa: add pxa dmaengine driver")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/c8fc5563c9593c914fde41f0f7d1489a21b45a9a.1696676782.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 10:27:35 +01:00
..
bestcomm
dw dmaengine: dw: Make it dependent to HAS_IOMEM 2021-04-28 12:08:39 +02:00
hsu dmaengine: hsu: disable spurious interrupt 2021-03-03 18:22:45 +01:00
ioat dmaengine: ioat: stop mod_timer from resurrecting deleted timer in __cleanup() 2022-10-26 13:17:06 +02:00
ipu
ppc4xx dmaengine: ppc4xx: fix off-by-one build failure 2018-11-13 11:15:05 -08:00
qcom dmaengine: QCOM_HIDMA_MGMT depends on HAS_IOMEM 2021-06-30 08:48:48 -04:00
sh dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size 2023-03-11 16:26:33 +01:00
xilinx dmaengine: xilinx_dma: Report error in case of dma_set_mask_and_coherent API failure 2022-10-26 13:16:51 +02:00
Kconfig idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM 2023-09-23 10:46:53 +02:00
Makefile
TODO
acpi-dma.c dmaengine: acpi: Avoid comparison GSI with Linux vIRQ 2021-09-26 13:37:28 +02:00
altera-msgdma.c
amba-pl08x.c
at_hdmac.c dmaengine: at_hdmac: Check return code of dma_async_device_register 2022-11-25 17:36:48 +01:00
at_hdmac_regs.h dmaengine: at_hdmac: Fix at_lli struct definition 2022-11-25 17:36:47 +01:00
at_xdmac.c dmaengine: at_xdmac: do not enable all cyclic channels 2023-05-17 11:11:46 +02:00
bcm-sba-raid.c
bcm2835-dma.c dmaengine: bcm2835: Print error in case setting DMA mask fails 2019-10-05 12:47:45 +02:00
coh901318.c dmaengine: coh901318: Fix a double lock bug in dma_tc_handle() 2020-03-11 18:03:08 +01:00
coh901318.h
coh901318_lli.c
cppi41.c dmaengine: cppi41: Fix cppi41_dma_prep_slave_sg() when idle 2019-11-06 12:43:36 +01:00
dma-axi-dmac.c dmaengine: axi-dmac: Don't check the number of frames for alignment 2020-01-27 14:46:30 +01:00
dma-jz4740.c
dma-jz4780.c dmaengine: dma-jz4780: Fix race in jz4780_dma_tx_status 2020-11-05 11:07:01 +01:00
dmaengine.c dmaengine: Fix double increment of client_count in dma_chan_get() 2023-02-06 07:46:30 +01:00
dmaengine.h dmaengine: dmaengine_desc_callback_valid(): Check for `callback_result` 2021-11-26 11:40:35 +01:00
dmatest.c dmaengine: dmatest: Fix iteration non-stop logic 2020-05-05 19:15:53 +02:00
edma.c dmaengine: ti: edma: handle irq_of_parse_and_map() errors 2023-11-20 10:27:34 +01:00
ep93xx_dma.c
fsl-edma.c dmaengine: fsl-edma: Fix NULL pointer exception in fsl_edma_tx_handler 2020-07-22 09:22:28 +02:00
fsl_raid.c
fsl_raid.h
fsldma.c dmaengine: fsldma: Fix a resource leak in an error handling path of the probe function 2021-03-03 18:22:45 +01:00
fsldma.h
idma64.c dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:59 +02:00
idma64.h dmaengine: idma64: Use actual device for DMA transfers 2019-06-15 11:54:59 +02:00
img-mdc-dma.c
imx-dma.c dmaengine: imx-dma: fix warning comparison of distinct pointer types 2019-04-05 22:31:38 +02:00
imx-sdma.c dmaengine: imx-sdma: Fix error checking in sdma_event_remap 2022-04-27 13:15:29 +02:00
iop-adma.c dmaengine: iop-adma: use correct printk format strings 2019-10-05 12:47:51 +02:00
k3dma.c dmaengine: k3dma: Avoid null pointer traversal 2020-01-17 19:45:54 +01:00
lpc18xx-dmamux.c
mic_x100_dma.c
mic_x100_dma.h
mmp_pdma.c dmaengine: pxa/mmp: stop referencing config->slave_id 2022-01-27 09:00:52 +01:00
mmp_tdma.c dmaengine: mmp_tdma: Reset channel error on release 2020-05-20 08:17:06 +02:00
moxart-dma.c
mpc512x_dma.c
mv_xor.c dmaengine: mv_xor: Use correct device for DMA API 2020-01-27 14:46:20 +01:00
mv_xor.h
mv_xor_v2.c dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove() 2022-11-25 17:36:46 +01:00
mxs-dma.c
nbpfaxi.c
of-dma.c dmaengine: of-dma: router_xlate to return -EPROBE_DEFER if controller is not yet available 2021-08-26 08:37:07 -04:00
omap-dma.c dmaengine: ti: omap-dma: Add cleanup in omap_dma_probe() 2019-09-21 07:15:44 +02:00
pch_dma.c dmaengine: pch_dma.c: Avoid data race between probe and irq handler 2020-05-20 08:17:06 +02:00
pl330.c dmaengine: pl330: Return DMA_PAUSED when transaction is paused 2023-08-16 18:10:53 +02:00
pxa_dma.c dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc() 2023-11-20 10:27:35 +01:00
s3c24xx-dma.c
sa11x0-dma.c
sirf-dma.c
st_fdma.c dmaengine: st_fdma: fix MODULE_ALIAS 2021-12-22 09:17:59 +01:00
st_fdma.h
ste_dma40.c dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe 2023-11-08 11:21:08 +01:00
ste_dma40_ll.c
ste_dma40_ll.h
stm32-dma.c dmaengine: stm32-dma: fix incomplete configuration in cyclic mode 2018-11-13 11:15:05 -08:00
sun4i-dma.c
sun6i-dma.c
tegra20-apb-dma.c dmaengine: tegra-apb: Prevent race conditions on channel's freeing 2020-10-01 13:12:35 +02:00
tegra210-adma.c dmaengine: tegra210-adma: Fix runtime PM imbalance on error 2020-07-29 07:42:55 +02:00
ti-dma-crossbar.c dmaengine: ti: Add missing put_device in ti_dra7_xbar_route_allocate 2022-07-12 16:27:29 +02:00
timb_dma.c dmaengine: timb_dma: Use proper enum in td_prep_slave_sg 2019-11-24 08:22:58 +01:00
txx9dmac.c
txx9dmac.h
virt-dma.c
virt-dma.h
xgene-dma.c
zx_dma.c