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

Configure Feed

Select the types of activity you want to include in your feed.

media: platform: Use dev_err_probe instead of dev_err

It is possible that dma_request_chan will return EPROBE_DEFER,
which means that dma->xdev->dev is not ready yet. In this case,
dev_err(dma->xdev->dev), there will be no output. This patch
fixes the bug.

Signed-off-by: Wang Ming <machel@vivo.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>

authored by

Wang Ming and committed by
Hans Verkuil
3f1e1f69 026c3417

+2 -3
+2 -3
drivers/media/platform/xilinx/xilinx-dma.c
··· 708 708 snprintf(name, sizeof(name), "port%u", port); 709 709 dma->dma = dma_request_chan(dma->xdev->dev, name); 710 710 if (IS_ERR(dma->dma)) { 711 - ret = PTR_ERR(dma->dma); 712 - if (ret != -EPROBE_DEFER) 713 - dev_err(dma->xdev->dev, "no VDMA channel found\n"); 711 + ret = dev_err_probe(dma->xdev->dev, PTR_ERR(dma->dma), 712 + "no VDMA channel found\n"); 714 713 goto error; 715 714 } 716 715