diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-21 09:24:57 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-04-10 09:48:29 -0700 |
commit | 5d92f71e687e4e1a0bed489707d1ec58fe1100de (patch) | |
tree | 9d55fdba287db4a27318a4a6b514aa506f100036 /mm/util.c | |
parent | 099f5d01a6f73712e17552679aa724e021809a6e (diff) |
Staging: android: timed_gpio: Fix resource leak in timed_gpio_probe error paths
If gpio_request fails, we need to free all allocated resources.
Current code uses wrong array index to access gpio_data array.
So current code actually frees gpio_data[i].gpio by j times.
This patch moves the error handling code to err_out and thus improves
readability.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm/util.c')
0 files changed, 0 insertions, 0 deletions