Skip to content

Commit

Permalink
Staging: iio: --/++ confusion in build_channel_array() error cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
roel kluin authored and Greg Kroah-Hartman committed Jan 20, 2011
1 parent 4a5200a commit 267024a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/staging/iio/Documentation/iio_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 267024a

Please sign in to comment.