mirror of
https://github.com/torvalds/linux.git
synced 2026-07-30 19:21:28 +02:00
mem-buf: Exit mem_buf_lend_internal if the mem-buf not probed
Exit with an error from mem_buf_lend_internal() if the driver hasn't probed. Change-Id: Ide42166c2f850197f989a228f9139d401411a914 Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
This commit is contained in:
parent
3a0a1539ac
commit
f484c0e648
|
|
@ -452,6 +452,11 @@ static int mem_buf_lend_internal(struct dma_buf *dmabuf,
|
|||
if (!arg->nr_acl_entries || !arg->vmids || !arg->perms)
|
||||
return -EINVAL;
|
||||
|
||||
if (!mem_buf_dev) {
|
||||
pr_err("%s: mem-buf driver not probed!\n", __func__);
|
||||
return -ENODEV;
|
||||
}
|
||||
|
||||
vmperm = to_mem_buf_vmperm(dmabuf);
|
||||
if (IS_ERR(vmperm)) {
|
||||
pr_err_ratelimited("dmabuf ops %ps are not a mem_buf_dma_buf_ops\n",
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user