]> git.baikalelectronics.ru Git - kernel.git/commit
vfio: ccw: improve error handling for vfio_ccw_mdev_remove
authorDong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Wed, 12 Apr 2017 09:08:16 +0000 (11:08 +0200)
committerCornelia Huck <cornelia.huck@de.ibm.com>
Wed, 12 Apr 2017 10:34:17 +0000 (12:34 +0200)
commitb7adc0a2d8f5fadee7902f46dbf2d3e7024b44d4
treedaccaeb012b298ebeec12ba54ea53cc0254e9ce1
parent3fa02389758740debd7da66791e46f5bfc719504
vfio: ccw: improve error handling for vfio_ccw_mdev_remove

When vfio_ccw_mdev_reset fails during the remove process of the mdev,
the current implementation simply returns.

The failure indicates that the subchannel device is in a NOT_OPER state,
thus the right thing to do should be removing the mdev.

While we are at here, reverse the condition check to make the code more
concise and readable.

Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Message-Id: <20170412090816.79108-3-bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
drivers/s390/cio/vfio_ccw_ops.c