commit | 5d92f71e687e4e1a0bed489707d1ec58fe1100de | [log] [tgz] |
---|---|---|
author | Axel Lin <axel.lin@gmail.com> | Wed Mar 21 09:24:57 2012 +0800 |
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | Tue Apr 10 09:48:29 2012 -0700 |
tree | 9d55fdba287db4a27318a4a6b514aa506f100036 | |
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>