summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2022-06-10 01:19:28 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2022-06-10 01:19:28 +0000
commit2aa8848c90a0be51000757f8dbfd84344b93ca31 (patch)
treede19a2117b15cd0229b6537694100dc23a432916 /sys/dev
parent50ba382b87010e8194ce97e067c2ee2049e891c3 (diff)
drm/amdgpu/cs: make commands with 0 chunks illegal behaviour.
From Dave Airlie 70276460e914d560e96bfc208695a872fe9469c9 in linux 5.15.y/5.15.46 31ab27b14daaa75541a415c6794d6f3567fea44a in mainline linux
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
index 9a8b2548a9f..a0eaadd3645 100644
--- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
+++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_cs.c
@@ -115,7 +115,7 @@ static int amdgpu_cs_parser_init(struct amdgpu_cs_parser *p, union drm_amdgpu_cs
int ret;
if (cs->in.num_chunks == 0)
- return 0;
+ return -EINVAL;
chunk_array = kvmalloc_array(cs->in.num_chunks, sizeof(uint64_t), GFP_KERNEL);
if (!chunk_array)