Commit f5e297a1 authored by Bjorn Andersson's avatar Bjorn Andersson Committed by Herbert Xu
Browse files

crypto: qce - Provide dev_err_probe() status on DMA failure



On multiple occasions the qce device have shown up in devices_deferred,
without the explanation that this came from the failure to acquire the
DMA channels from the associated BAM.

Use dev_err_probe() to associate this context with the failure to faster
pinpoint the culprit when this happens in the future.

Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Reviewed-by: default avatarAbel Vesa <abel.vesa@linaro.org>
Reviewed-by: default avatarDavid Heidelberg <david@ixit.cz>
Reviewed-by: default avatarKonrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent 12ad5b23
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -24,11 +24,13 @@ int devm_qce_dma_request(struct device *dev, struct qce_dma_data *dma)

	dma->txchan = dma_request_chan(dev, "tx");
	if (IS_ERR(dma->txchan))
		return PTR_ERR(dma->txchan);
		return dev_err_probe(dev, PTR_ERR(dma->txchan),
				     "Failed to get TX DMA channel\n");

	dma->rxchan = dma_request_chan(dev, "rx");
	if (IS_ERR(dma->rxchan)) {
		ret = PTR_ERR(dma->rxchan);
		ret = dev_err_probe(dev, PTR_ERR(dma->rxchan),
				    "Failed to get RX DMA channel\n");
		goto error_rx;
	}