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 <[email protected]>
Acked-by: Jonathan Cameron <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
  • Loading branch information
RoelKluin authored and gregkh 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.