]> git.baikalelectronics.ru Git - kernel.git/commit
drm/tilcdc: Fix the error path in tilcdc_load()
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Tue, 2 Sep 2014 12:51:15 +0000 (09:51 -0300)
committerDave Airlie <airlied@redhat.com>
Wed, 17 Sep 2014 00:54:33 +0000 (10:54 +1000)
commita5128a34a59cf377120f6664743ef93645497121
tree59ad1d8e4434f4c42ff4dc96184a6762012afb60
parentafd0f49f0610fa0b2c993f7384ecbd40c80ecd51
drm/tilcdc: Fix the error path in tilcdc_load()

The current error path calls tilcdc_unload() in case of an error to release
the resources. However, this is wrong because not all resources have been
allocated by the time an error occurs in tilcdc_load().

To fix it, this commit adds proper labels to bail out at the different
stages in the load function, and release only the resources actually allocated.

Tested-by: Darren Etheridge <detheridge@ti.com>
Tested-by: Johannes Pointner <johannes.pointner@br-automation.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/tilcdc/tilcdc_drv.c