From: Axel Lin Date: Wed, 21 Mar 2012 01:24:57 +0000 (+0800) Subject: Staging: android: timed_gpio: Fix resource leak in timed_gpio_probe error paths X-Git-Tag: v3.4-rc3~25^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d92f71e687e4e1a0bed489707d1ec58fe1100de;p=pandora-kernel.git 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 Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed