From: Guennadi Liakhovetski Date: Fri, 3 Sep 2010 07:19:57 +0000 (+0000) Subject: fbdev: sh_mobile_lcdcfb: fix more error paths X-Git-Tag: v2.6.37-rc1~23^2^2^2~29 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5ef6b505d9df45558402bdb823a078840a6a26c4;p=pandora-kernel.git fbdev: sh_mobile_lcdcfb: fix more error paths This patch fixes the following two erroneous error paths: hw_usecnt is allocated with a value of 0, therefore in an early error case, calling sh_mobile_lcdc_clk_off() will wrongly conclude, that hw_usecnt has already been incremented. Then sh_mobile_lcdc_runtime_suspend() will be called, which will access uninitialised data fields and crash the kernel. sh_mobile_lcdc_stop() can be called before framebuffer has been allocated, then ch->info is NULL and dereferencing it will Oops too. Signed-off-by: Guennadi Liakhovetski Signed-off-by: Paul Mundt --- Reading git-diff-tree failed