struct dma_buf_attachment *attach;
struct drm_gem_object *obj;
struct qaic_bo *bo;
struct dma_buf_attachment *attach;
struct drm_gem_object *obj;
struct qaic_bo *bo;
int ret;
bo = qaic_alloc_init_bo();
int ret;
bo = qaic_alloc_init_bo();
- size = PAGE_ALIGN(attach->dmabuf->size);
- if (size == 0) {
+ if (!attach->dmabuf->size) {
ret = -EINVAL;
goto size_align_fail;
}
ret = -EINVAL;
goto size_align_fail;
}
- drm_gem_private_object_init(dev, obj, size);
+ drm_gem_private_object_init(dev, obj, attach->dmabuf->size);
/*
* skipping dma_buf_map_attachment() as we do not know the direction
* just yet. Once the direction is known in the subsequent IOCTL to
/*
* skipping dma_buf_map_attachment() as we do not know the direction
* just yet. Once the direction is known in the subsequent IOCTL to