Skip to content

Commit 4139f99

Browse files
Minjie Dudamien-lemoal
authored andcommitted
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>
1 parent cec148c commit 4139f99

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/ata/pata_arasan_cf.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,8 @@ static void data_xfer(struct work_struct *work)
529529
/* dma_request_channel may sleep, so calling from process context */
530530
acdev->dma_chan = dma_request_chan(acdev->host->dev, "data");
531531
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");
533534
acdev->dma_chan = NULL;
534535
goto chan_request_fail;
535536
}

0 commit comments

Comments
 (0)