drivers/testing/switchtest: Properly clean up xnthread on error
PATCH 1/1 drivers/testing/switchtest: Properly clean up xnthread on error
From: Jan Kiszka <[email protected]>
Analogously to dfb55d64fc0d.
Signed-off-by Jan Kiszka <[email protected]>
--- kernel/drivers/testing/switchtest.c | 2 ++ 1 file changed, 2 insertions(+)
kernel/drivers/testing/switchtest.c +2 -0
@@ -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
Signature · 1 line
2.31.1
Quoted 3 lines · Jan Kiszka via Xenomai
From: Jan Kiszka <[email protected]>
Analogously to
dfb55d64fc0d.
Seems both qualify for stable.
Quoted 19 lines
Signed-off-by Jan Kiszka <[email protected]>--- kernel/drivers/testing/switchtest.c | 2 ++ 1 file changed, 2 insertions(+)kernel/drivers/testing/switchtest.c +2
-0@@ -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