s390/vfio-ap: fix an error handling path in vfio_ap_mdev_probe_queue()
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sun, 31 Jul 2022 16:09:14 +0000 (18:09 +0200)
committerHeiko Carstens <hca@linux.ibm.com>
Fri, 13 Jan 2023 13:15:07 +0000 (14:15 +0100)
commit08866d34c7099e981918d34aab5d6a437436628f
tree538455f82d54fc02167a0523d80594376188a39b
parent760c6ce64b7355bf583928200db9a553c0751a11
s390/vfio-ap: fix an error handling path in vfio_ap_mdev_probe_queue()

The commit in Fixes: has switch the order of a sysfs_create_group() and a
kzalloc().

It correctly removed the now useless kfree() but forgot to add a
sysfs_remove_group() in case of (unlikely) memory allocation failure.

Add it now.

Fixes: 260f3ea14138 ("s390/vfio-ap: move probe and remove callbacks to vfio_ap_ops.c")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
Link: https://lore.kernel.org/r/d0c0a35eec4fa87cb7f3910d8ac4dc0f7dc9008a.1659283738.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
drivers/s390/crypto/vfio_ap_ops.c