Commit f96d055e authored by Hartmut Knaack's avatar Hartmut Knaack Committed by Jonathan Cameron
Browse files

tools:iio:lsiio: add closedir before exit



In dump_channels() the DIR *dp was left open on exit. Close it and check
for errors.

Signed-off-by: default avatarHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: default avatarJonathan Cameron <jic23@kernel.org>
parent 121b5e50
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -56,7 +56,7 @@ static int dump_channels(const char *dev_dir_name)
			printf("   %-10s\n", ent->d_name);
		}

	return 0;
	return (closedir(dp) == -1) ? -errno : 0;
}

static int dump_one_device(const char *dev_dir_name)