s390/ism: Do not unregister clients with registered DMBs
authorNiklas Schnelle <schnelle@linux.ibm.com>
Fri, 7 Jul 2023 10:56:22 +0000 (12:56 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 8 Jul 2023 09:07:14 +0000 (10:07 +0100)
commit266deeea34ffd28c6b6a63edf2af9b5a07161c24
treeea3c0bf72784a7b70e1f6ee9ae7ee5f43a2f5f14
parent76631ffa2fd2d45bae5ad717eef716b94144e0e7
s390/ism: Do not unregister clients with registered DMBs

When ism_unregister_client() is called but the client still has DMBs
registered it returns -EBUSY and prints an error. This only happens
after the client has already been unregistered however. This is
unexpected as the unregister claims to have failed. Furthermore as this
implies a client bug a WARN() is more appropriate. Thus move the
deregistration after the check and use WARN().

Fixes: 89e7d2ba61b7 ("net/ism: Add new API for client registration")
Signed-off-by: Niklas Schnelle <schnelle@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/ism_drv.c