On Thu, 2021-10-07 at 16:12 +0200, Jan Kiszka via Xenomai wrote: > From: Jan Kiszka <[email protected]> > > Analogously to dfb55d64fc0d.
Seems both qualify for stable. > > Signed-off-by: Jan Kiszka <[email protected]> > --- > kernel/drivers/testing/switchtest.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/kernel/drivers/testing/switchtest.c > b/kernel/drivers/testing/switchtest.c > index 8224974e5c..6f8a9fcaa3 100644 > --- a/kernel/drivers/testing/switchtest.c > +++ b/kernel/drivers/testing/switchtest.c > @@ -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
