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: sz_beta4~33 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f4ea770d9ec34fe9232b962f385e0700f100f3ec;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