Commit 016d1ca3 authored by Dan Carpenter's avatar Dan Carpenter Committed by Christian König

drm/selftests: missing error code in igt_buddy_alloc_smoke()

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

Fixes: e6ff5ef8 ("drm/selftests: add drm buddy smoke testcase")
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: default avatarArunpravin <Arunpravin.PaneerSelvam@amd.com>
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220307125458.GA16710@kili
parent f6e68388
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment