summaryrefslogtreecommitdiff
path: root/drivers/s390/cio/chsc.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2024-02-22 15:45:01 +0200
committerHeiko Carstens <hca@linux.ibm.com>2024-03-17 19:08:49 +0100
commit481ec3b37678639ec1f8197c92b6e604b9549b2d (patch)
tree8b45b603cf28c54be96ebc14d60d08ab342c5022 /drivers/s390/cio/chsc.c
parent69460c5e6be063a85bb144845422776e0ffe8faa (diff)
s390/cio: use while (i--) pattern to clean up
Use more natural while (i--) pattern to clean up allocated resources. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Vineeth Vijayan <vneethv@linux.ibm.com> Link: https://lore.kernel.org/r/20240222134501.236871-1-andriy.shevchenko@linux.intel.com Signed-off-by: Heiko Carstens <hca@linux.ibm.com>
Diffstat (limited to 'drivers/s390/cio/chsc.c')
-rw-r--r--drivers/s390/cio/chsc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/s390/cio/chsc.c b/drivers/s390/cio/chsc.c
index 722ad623c729..44ea76f9e1de 100644
--- a/drivers/s390/cio/chsc.c
+++ b/drivers/s390/cio/chsc.c
@@ -844,7 +844,7 @@ chsc_add_cmg_attr(struct channel_subsystem *css)
}
return ret;
cleanup:
- for (--i; i >= 0; i--) {
+ while (i--) {
if (!css->chps[i])
continue;
chp_remove_cmg_attr(css->chps[i]);