summaryrefslogtreecommitdiff
path: root/tools/testing/selftests
diff options
context:
space:
mode:
authorMaxime Ripard <mripard@kernel.org>2024-07-30 10:13:51 +0300
committerMaxime Ripard <mripard@kernel.org>2024-07-30 10:14:34 +0300
commit11dcda9b7a3407abe941092c87e7bc7e2da9e97b (patch)
treeff86143a134c56fbae9ba520621833790debc6fa /tools/testing/selftests
parenta1ff5a7d78a036d6c2178ee5acd6ba4946243800 (diff)
parent291e4baf70019f17a81b7b47aeb186b27d222159 (diff)
downloadlinux-11dcda9b7a3407abe941092c87e7bc7e2da9e97b.tar.xz
Merge drm-misc/drm-misc-next-fixes into drm-misc-fixes
There's a patch left in drm-misc-next-fixes, let's bring it into drm-misc-fixes. Signed-off-by: Maxime Ripard <mripard@kernel.org>
Diffstat (limited to 'tools/testing/selftests')
-rw-r--r--tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
index 5f541522364f..5d0a809dc2df 100644
--- a/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
+++ b/tools/testing/selftests/dmabuf-heaps/dmabuf-heap.c
@@ -29,9 +29,11 @@ static int check_vgem(int fd)
version.name = name;
ret = ioctl(fd, DRM_IOCTL_VERSION, &version);
- if (ret)
+ if (ret || version.name_len != 4)
return 0;
+ name[4] = '\0';
+
return !strcmp(name, "vgem");
}