@@ -679,8 +679,8 @@ static int qcom_slim_ngd_init_rx_msgq(struct qcom_slim_ngd_ctrl *ctrl)
ctrl->dma_rx_channel = dma_request_chan(dev, "rx");
if (IS_ERR(ctrl->dma_rx_channel)) {
- dev_err(dev, "Failed to request RX dma channel");
- ret = PTR_ERR(ctrl->dma_rx_channel);
+ ret = dev_err_probe(dev, PTR_ERR(ctrl->dma_rx_channel),
+ "Failed to request RX dma channel");
ctrl->dma_rx_channel = NULL;
return ret;
}
@@ -717,8 +717,8 @@ static int qcom_slim_ngd_init_tx_msgq(struct qcom_slim_ngd_ctrl *ctrl)
ctrl->dma_tx_channel = dma_request_chan(dev, "tx");
if (IS_ERR(ctrl->dma_tx_channel)) {
- dev_err(dev, "Failed to request TX dma channel");
- ret = PTR_ERR(ctrl->dma_tx_channel);
+ ret = dev_err_probe(dev, PTR_ERR(ctrl->dma_tx_channel),
+ "Failed to request TX dma channel");
ctrl->dma_tx_channel = NULL;
return ret;
}
It is possible that dma_request_chan will return EPROBE_DEFER, which means that dev is not ready yet. In this case, dev_err(dev), there will be no output. This patch fixes the bug. Signed-off-by: Wang Ming <machel@vivo.com> --- drivers/slimbus/qcom-ngd-ctrl.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)