]> git.baikalelectronics.ru Git - kernel.git/commit
drivers/video/ep93xx-fb.c: clean up error-handling code
authorJulia Lawall <Julia.Lawall@lip6.fr>
Wed, 18 Apr 2012 19:37:08 +0000 (21:37 +0200)
committerFlorian Tobias Schandinat <FlorianSchandinat@gmx.de>
Sat, 21 Apr 2012 21:47:49 +0000 (21:47 +0000)
commit0f07e5d2f37d6379144ef7794ee35ef06bca89d0
tree6bd555424eac28a2b13277920fbc358a39c2de88
parent1c2014d0ec4a846a1cd1c0f403baee4564cf0c58
drivers/video/ep93xx-fb.c: clean up error-handling code

There were two problems in this code: failure of the setup function should
free locally allocated resources like other nearby failures, and the test
if (&info->cmap) can never be false.  To generally clean things up, this
patch reorders the error handling code at the failed label and adds labels
so that the conditionals are not necessary.

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ryan Mallon <rmallon@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
drivers/video/ep93xx-fb.c