From: Harald Welte Date: Tue, 19 May 2009 09:12:58 +0000 (+0800) Subject: viafb: Fix various resource leaks during module_init() X-Git-Tag: v2.6.35-rc1~475^2~34 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=109771a68bedda77606500dc14455eca92df6769;p=pandora-kernel.git viafb: Fix various resource leaks during module_init() The current code executed from module_init() in viafb does not have proper error checking and [partial] resoure release paths in case an error happens half way through driver initialization. This patch adresses the most obvious of those issues, such as a leftover i2c bus if module_init (and thus module load) fails. [jc: fixed merge conflicts] [jc: also restored -ENOMEM return on ioremap() fail] Cc: Florian Tobias Schandinat Cc: ScottFang@viatech.com.cn Cc: JosephChan@via.com.tw Signed-off-by: Harald Welte --- Reading git-diff-tree failed