vfio-ccw: Attempt to clean up all IRQs on error
commitdcc9cf3801039741b7a574b5035db283a7fed271
authorEric Farman <farman@linux.ibm.com>
Wed, 28 Apr 2021 14:36:52 +0000 (28 16:36 +0200)
committerCornelia Huck <cohuck@redhat.com>
Thu, 20 May 2021 12:19:30 +0000 (20 14:19 +0200)
tree3c17ce5d360ae26eee40bc1f91ab87f7869f2e59
parenta6d8b731130bf76c3d2932b067befa5c380e0dee
vfio-ccw: Attempt to clean up all IRQs on error

The vfio_ccw_unrealize() routine makes an unconditional attempt to
unregister every IRQ notifier, though they may not have been registered
in the first place (when running on an older kernel, for example).

Let's mirror this behavior in the error cleanups in vfio_ccw_realize()
so that if/when new IRQs are added, it is less confusing to recognize
the necessary procedures. The worst case scenario would be some extra
messages about an undefined IRQ, but since this is an error exit that
won't be the only thing to worry about.

And regarding those messages, let's change it to a warning instead of
an error, to better reflect their severity. The existing code in both
paths handles everything anyway.

Signed-off-by: Eric Farman <farman@linux.ibm.com>
Acked-by: Matthew Rosato <mjrosato@linux.ibm.com>
Message-Id: <20210428143652.1571487-1-farman@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
hw/vfio/ccw.c