]> git.baikalelectronics.ru Git - kernel.git/commit
drm/gma500: fix double freeing
authorSudip Mukherjee <sudipm.mukherjee@gmail.com>
Thu, 8 Oct 2015 12:47:48 +0000 (18:17 +0530)
committerPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Fri, 8 Apr 2016 11:39:23 +0000 (13:39 +0200)
commit753fd73ba08f726e09212a86d8fcf935f839679f
tree0b62e42b8bddd65c5d6ee0e742b5de93e0327cf4
parente1418ca122d2c4229634116c483c65198f0053a3
drm/gma500: fix double freeing

We are allocating backing using psbfb_alloc() and so
backing->stolen is always true. So we were freeing backing two times.
Moreover if we follow the execution path then we should be freeing
backing after we have released the helper. So remove the one which frees
backing before the helper is released.
While at it the error labels are also renamed to give a meaningful
name.

[Patrik: Fixed conflict with removal of struct_mutex]

Signed-off-by: Sudip Mukherjee <sudip@vectorindia.org>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
drivers/gpu/drm/gma500/framebuffer.c