]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Fri, 31 Oct 2014 14:11:32 +0000 (15:11 +0100)
commit99a52137266e8cf196b0cd2facd325241e59e094
treeef4532714e2f114a4f1aeb98eab678b631c2a653
parent5436a41fe9dc95db899e96c10032c90626e289bb
drm/tilcdc: Fix the error path in tilcdc_load()

commit b478e336b3e75505707a11e78ef8b964ef0a03af upstream.

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/gpu/drm/tilcdc/tilcdc_drv.c