提交 267024a9 编写于 作者: R roel kluin 提交者: Greg Kroah-Hartman

Staging: iio: --/++ confusion in build_channel_array() error cleanup

Fix loop: it should decrement
Signed-off-by: NRoel Kluin <roel.kluin@gmail.com>
Acked-by: NJonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 4a5200ac
......@@ -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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册