Commit f4dac53c authored by Jan Kiszka's avatar Jan Kiszka
Browse files

drivers/testing/switchtest: Properly clean up xnthread on error

Analogously to dfb55d64

.
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent dfb55d64
......@@ -504,6 +504,8 @@ static int rtswitch_create_ktask(struct rtswitch_context *ctx,
sattr.entry = rtswitch_ktask;
sattr.cookie = &arg;
err = xnthread_start(&task->ktask, &sattr);
if (err)
__xnthread_discard(&task->ktask);
} else
/*
* In order to avoid calling xnthread_cancel() for an
......
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