Revert "s390/cio: Fix device lifecycle handling in css_alloc_subchannel()"

This reverts commit 2b2ad7ad4a28ffdb9f94e6d979b88a5b12b71681, which
was commit f65c75b0b9b5a390bc3beadcde0a6fbc3ad118f7 upstream.  The
order of initialisation and error paths in this function are
substantially different in 5.10 and this backport did not take that
into account.

Signed-off-by: Ben Hutchings <benh@debian.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Ulrich Hecht <uli@kernel.org>
This commit is contained in:
Ben Hutchings
2026-05-26 11:56:02 +02:00
committed by Ulrich Hecht
parent 0e06b72eeb
commit 80a786cc83

View File

@ -227,7 +227,7 @@ struct subchannel *css_alloc_subchannel(struct subchannel_id schid,
return sch;
err:
put_device(&sch->dev);
kfree(sch);
return ERR_PTR(ret);
}