mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user