diff options
author | Mark Brown <broonie@kernel.org> | 2020-08-25 11:01:46 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2020-08-25 11:01:46 +0100 |
commit | 3bec5b6aae830355e786e204b20a7cea38c3a8ed (patch) | |
tree | fd597b87faf55ceb2a207ee94f4feca6276696db /tools/gpio/lsgpio.c | |
parent | a577f3456c0a2fac3dee037c483753e6e68f3e49 (diff) | |
parent | d012a7190fc1fd72ed48911e77ca97ba4521bccd (diff) |
Merge tag 'v5.9-rc2' into regulator-5.9
Linux 5.9-rc2
Diffstat (limited to 'tools/gpio/lsgpio.c')
-rw-r--r-- | tools/gpio/lsgpio.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/gpio/lsgpio.c b/tools/gpio/lsgpio.c index 8a71ad36f83b..b08d7a5e779b 100644 --- a/tools/gpio/lsgpio.c +++ b/tools/gpio/lsgpio.c @@ -94,7 +94,7 @@ int list_device(const char *device_name) if (fd == -1) { ret = -errno; fprintf(stderr, "Failed to open %s\n", chrdev_name); - goto exit_close_error; + goto exit_free_name; } /* Inspect this GPIO chip */ @@ -141,6 +141,7 @@ int list_device(const char *device_name) exit_close_error: if (close(fd) == -1) perror("Failed to close GPIO character device file"); +exit_free_name: free(chrdev_name); return ret; } |