mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: Hartmut Knaack <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
This commit is contained in:
parent
121b5e505f
commit
f96d055e4b
1 changed files with 1 additions and 1 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue