Skip to content

Commit

Permalink
drm/selftests: missing error code in igt_buddy_alloc_smoke()
Browse files Browse the repository at this point in the history
[ Upstream commit 016d1ca ]

Set the error code to -ENOMEM if drm_random_order() fails.

Fixes: e6ff5ef ("drm/selftests: add drm buddy smoke testcase")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Arunpravin <Arunpravin.PaneerSelvam@amd.com>
Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220307125458.GA16710@kili
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Dan Carpenter authored and gregkh committed Jun 9, 2022
1 parent 229b90d commit b319f89
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/selftests/test-drm_buddy.c
Expand Up @@ -488,8 +488,10 @@ static int igt_buddy_alloc_smoke(void *arg)
}

order = drm_random_order(mm.max_order + 1, &prng);
if (!order)
if (!order) {
err = -ENOMEM;
goto out_fini;
}

for (i = 0; i <= mm.max_order; ++i) {
struct drm_buddy_block *block;
Expand Down

0 comments on commit b319f89

Please sign in to comment.