video: rockchip: rga3: print dma_buf_map error code

Signed-off-by: Yu Qiaowei <cerf.yu@rock-chips.com>
Change-Id: I820390743d2fb4bf3a0a5d7f2b9a1f76b8f0db67
This commit is contained in:
Yu Qiaowei
2023-04-19 17:44:31 +08:00
committed by Tao Huang
parent 7c18fdfce5
commit 5ab24a2706

View File

@@ -430,15 +430,15 @@ int rga_dma_map_buf(struct dma_buf *dma_buf, struct rga_dma_buffer *rga_dma_buff
attach = dma_buf_attach(dma_buf, rga_dev);
if (IS_ERR(attach)) {
pr_err("Failed to attach dma_buf\n");
ret = -EINVAL;
ret = PTR_ERR(attach);
pr_err("Failed to attach dma_buf, ret[%d]\n", ret);
goto err_get_attach;
}
sgt = dma_buf_map_attachment(attach, dir);
if (IS_ERR(sgt)) {
pr_err("Failed to map attachment\n");
ret = -EINVAL;
ret = PTR_ERR(sgt);
pr_err("Failed to map attachment, ret[%d]\n", ret);
goto err_get_sgt;
}
@@ -474,22 +474,22 @@ int rga_dma_map_fd(int fd, struct rga_dma_buffer *rga_dma_buffer,
dma_buf = dma_buf_get(fd);
if (IS_ERR(dma_buf)) {
pr_err("Fail to get dma_buf from fd[%d]\n", fd);
ret = -EINVAL;
ret = PTR_ERR(dma_buf);
pr_err("Fail to get dma_buf from fd[%d], ret[%d]\n", fd, ret);
return ret;
}
attach = dma_buf_attach(dma_buf, rga_dev);
if (IS_ERR(attach)) {
pr_err("Failed to attach dma_buf\n");
ret = -EINVAL;
ret = PTR_ERR(attach);
pr_err("Failed to attach dma_buf, ret[%d]\n", ret);
goto err_get_attach;
}
sgt = dma_buf_map_attachment(attach, dir);
if (IS_ERR(sgt)) {
pr_err("Failed to map attachment\n");
ret = -EINVAL;
ret = PTR_ERR(sgt);
pr_err("Failed to map attachment, ret[%d]\n", ret);
goto err_get_sgt;
}