From: roel kluin <roel.kluin@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>,
LKML <linux-kernel@vger.kernel.org>,
jic23@cam.ac.uk
Subject: [PATCH] iio: --/++ confusion in build_channel_array() error cleanup
Date: Sat, 01 Jan 2011 17:18:40 +0100 [thread overview]
Message-ID: <4D1F53E0.9050802@gmail.com> (raw)
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:
next reply other threads:[~2011-01-01 16:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-01 16:18 roel kluin [this message]
2011-01-01 18:01 ` [PATCH] iio: --/++ confusion in build_channel_array() error cleanup Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4D1F53E0.9050802@gmail.com \
--to=roel.kluin@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=jic23@cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox