Skip to content

Commit

Permalink
nvkms: Support NULL padding
Browse files Browse the repository at this point in the history
Signed-off-by: Yusuf Khan<[email protected]>
  • Loading branch information
YusufKhan-gamedev committed Jun 3, 2022
1 parent 952f7a0 commit 5e7f740
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion kernel-open/nvidia-drm/nvidia-drm-gem-dma-buf.c
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ int nv_drm_gem_export_dmabuf_memory_ioctl(struct drm_device *dev,
goto done;
}

if (p->__pad != 0) {
if (p->__pad != 0 | p->__pad != NULL) {
ret = -EINVAL;
NV_DRM_DEV_LOG_ERR(nv_dev, "Padding fields must be zeroed");
goto done;
Expand Down
4 changes: 2 additions & 2 deletions kernel-open/nvidia-drm/nvidia-drm-gem-nvkms-memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,7 @@ int nv_drm_gem_export_nvkms_memory_ioctl(struct drm_device *dev,
goto done;
}

if (p->__pad != 0) {
if (p->__pad != 0 | p->__pad != NULL) {
ret = -EINVAL;
NV_DRM_DEV_LOG_ERR(nv_dev, "Padding fields must be zeroed");
goto done;
Expand Down Expand Up @@ -448,7 +448,7 @@ int nv_drm_gem_alloc_nvkms_memory_ioctl(struct drm_device *dev,
goto failed;
}

if (p->__pad != 0) {
if (p->__pad != 0 | p->__pad != NULL) {
ret = -EINVAL;
NV_DRM_DEV_LOG_ERR(nv_dev, "non-zero value in padding field");
goto failed;
Expand Down

0 comments on commit 5e7f740

Please sign in to comment.