ANDROID: dma-buf: fix return type mismatch

During backporting FROMLIST patch for 5.11-rc, there was return
type mismatch warn. Fix it.

Bug: 170340257
Bug: 120293424
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: Ic489c56357184ac360c1e8feff5fbc7900f63ce6
This commit is contained in:
Minchan Kim 2021-01-26 09:16:22 -08:00
parent f7d52eda9f
commit 2a06c0a462

View File

@ -319,7 +319,7 @@ struct dma_buf *chunk_heap_allocate(struct dma_heap *heap, unsigned long len,
buffer = kzalloc(sizeof(*buffer), GFP_KERNEL);
if (!buffer)
return ret;
return ERR_PTR(ret);
INIT_LIST_HEAD(&buffer->attachments);
mutex_init(&buffer->lock);
@ -383,7 +383,7 @@ struct dma_buf *chunk_heap_allocate(struct dma_heap *heap, unsigned long len,
ret = dma_buf_fd(dmabuf, fd_flags);
if (ret < 0) {
dma_buf_put(dmabuf);
return ret;
return ERR_PTR(ret);
}
return dmabuf;