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

ata: pata_arasan_cf: Use dev_err_probe() instead dev_err() in data_xfer()

It is possible for dma_request_chan() to return EPROBE_DEFER, which
means acdev->host->dev is not ready yet. At this point dev_err() will
have no output. Use dev_err_probe() instead.

Signed-off-by: Minjie Du <duminjie@vivo.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru>
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>

authored by

Minjie Du and committed by
Damien Le Moal
4139f992 cec148c2

+2 -1
+2 -1
drivers/ata/pata_arasan_cf.c
··· 529 529 /* dma_request_channel may sleep, so calling from process context */ 530 530 acdev->dma_chan = dma_request_chan(acdev->host->dev, "data"); 531 531 if (IS_ERR(acdev->dma_chan)) { 532 - dev_err(acdev->host->dev, "Unable to get dma_chan\n"); 532 + dev_err_probe(acdev->host->dev, PTR_ERR(acdev->dma_chan), 533 + "Unable to get dma_chan\n"); 533 534 acdev->dma_chan = NULL; 534 535 goto chan_request_fail; 535 536 }