]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
pxa168fb: Fix the function used to release some memory in an error handling path
authorChristophe JAILLET <christophe.jaillet@wanadoo.fr>
Sat, 31 Aug 2019 10:00:24 +0000 (12:00 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Tue, 7 Apr 2020 08:49:50 +0000 (10:49 +0200)
commitbdf064f824ff9e4374b282053da1aeee0f9d37f5
treebce66236010a655a2c46b11ceffd15b7f11fdf35
parent4cbde27f39ffaff2a0dd44e4904b63ff96ac6020
pxa168fb: Fix the function used to release some memory in an error handling path

BugLink: https://bugs.launchpad.net/bugs/1867837
[ Upstream commit 3c911fe799d1c338d94b78e7182ad452c37af897 ]

In the probe function, some resources are allocated using 'dma_alloc_wc()',
they should be released with 'dma_free_wc()', not 'dma_free_coherent()'.

We already use 'dma_free_wc()' in the remove function, but not in the
error handling path of the probe function.

Also, remove a useless 'PAGE_ALIGN()'. 'info->fix.smem_len' is already
PAGE_ALIGNed.

Fixes: 638772c7553f ("fb: add support of LCD display controller on pxa168/910 (base layer)")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Reviewed-by: Lubomir Rintel <lkundrak@v3.sk>
CC: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190831100024.3248-1-christophe.jaillet@wanadoo.fr
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/video/fbdev/pxa168fb.c