public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iio: --/++ confusion in build_channel_array() error cleanup
@ 2011-01-01 16:18 roel kluin
  2011-01-01 18:01 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: roel kluin @ 2011-01-01 16:18 UTC (permalink / raw)
  To: Andrew Morton, LKML, jic23

Fix loop: it should decrement

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
 drivers/staging/iio/Documentation/iio_utils.h |    2 +-
 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:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-01-01 18:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-01 16:18 [PATCH] iio: --/++ confusion in build_channel_array() error cleanup roel kluin
2011-01-01 18:01 ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox