summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorroel kluin <roel.kluin@gmail.com>2011-01-01 18:01:51 (GMT)
committerGreg Kroah-Hartman <gregkh@suse.de>2011-01-20 23:58:17 (GMT)
commit267024a9f6cc7f7e26ed57424d5d0c8558769b56 (patch)
tree744e44045ea44564863e665afd4bcd5dadb9a473 /drivers
parent4a5200ac8bd0e1a85aacea7cf4ded6e597254be0 (diff)
downloadlinux-fsl-qoriq-267024a9f6cc7f7e26ed57424d5d0c8558769b56.tar.xz
Staging: iio: --/++ confusion in build_channel_array() error cleanup
Fix loop: it should decrement Signed-off-by: Roel Kluin <roel.kluin@gmail.com> Acked-by: Jonathan Cameron <jic23@cam.ac.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/iio/Documentation/iio_utils.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/iio/Documentation/iio_utils.h b/drivers/staging/iio/Documentation/iio_utils.h
index 0372424..4dc961c 100644
--- a/drivers/staging/iio/Documentation/iio_utils.h
+++ b/drivers/staging/iio/Documentation/iio_utils.h
@@ -398,7 +398,7 @@ inline int build_channel_array(const char *device_dir,
return 0;
error_cleanup_array:
- for (i = count - 1; i >= 0; i++)
+ for (i = count - 1; i >= 0; i--)
free((*ci_array)[i].name);
free(*ci_array);
error_close_dir: