Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sh_mmcif: correctly report success when obtaining DMA channels

The debug message could still report success when getting the channels
was OK but configuring them failed. This actually caused a minor detour
when debugging DMA problems, so make sure the success is only reported
when the channels are really ready-to-use.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20240928094454.3592-2-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>

authored by

Wolfram Sang and committed by
Ulf Hansson
d61366cd acbf2f3c

+3 -2
+3 -2
drivers/mmc/host/sh_mmcif.c
··· 439 439 if (IS_ERR(host->chan_rx)) 440 440 host->chan_rx = NULL; 441 441 } 442 - dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx, 443 - host->chan_rx); 444 442 445 443 if (!host->chan_tx || !host->chan_rx || 446 444 sh_mmcif_dma_slave_config(host, host->chan_tx, DMA_MEM_TO_DEV) || 447 445 sh_mmcif_dma_slave_config(host, host->chan_rx, DMA_DEV_TO_MEM)) 448 446 goto error; 447 + 448 + dev_dbg(dev, "%s: got channel TX %p RX %p\n", __func__, host->chan_tx, 449 + host->chan_rx); 449 450 450 451 return; 451 452