diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2009-03-26 15:24:27 +0100 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-03-26 15:24:20 +0100 |
commit | 700e982f28f5e13cef8eea93ac8c6702f699d894 (patch) | |
tree | c91163f8972c0e1226d6db3c90ea31578f229c2b /drivers/s390/cio | |
parent | c38f96080955854e54df9cb392bc674e1ae330e1 (diff) |
[S390] qdio: call qdio_free also if qdio_shutdown fails
qdio_cleanup is a wrapper function that should call qdio_shutdown and
qdio_free. qdio_free was not called if an error occured in qdio_shutdown
resulting in a missing free of allocated resources.
Call qdio_free regardless of the return value of qdio_shutdown.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/cio')
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index 1974ec7bf0e..8e6bc9cddfa 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c @@ -1073,8 +1073,9 @@ EXPORT_SYMBOL_GPL(qdio_get_ssqd_desc); * @cdev: associated ccw device * @how: use halt or clear to shutdown * - * This function calls qdio_shutdown() for @cdev with method @how - * and on success qdio_free() for @cdev. + * This function calls qdio_shutdown() for @cdev with method @how. + * and qdio_free(). The qdio_free() return value is ignored since + * !irq_ptr is already checked. */ int qdio_cleanup(struct ccw_device *cdev, int how) { @@ -1085,8 +1086,8 @@ int qdio_cleanup(struct ccw_device *cdev, int how) return -ENODEV; rc = qdio_shutdown(cdev, how); - if (rc == 0) - rc = qdio_free(cdev); + + qdio_free(cdev); return rc; } EXPORT_SYMBOL_GPL(qdio_cleanup); |