]> git.baikalelectronics.ru Git - 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)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Fri, 3 Jan 2020 13:27:42 +0000 (14:27 +0100)
commit0a2e77510f1b34b18944541ac857a7a78f8d80a0
tree700b16ba7f4584d338603b4603398e4ae4becb2d
parentff9851f231117430f3c69b9bfe332a80a0b61bc8
pxa168fb: Fix the function used to release some memory in an error handling path

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: 46ec89b476e9 ("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
drivers/video/fbdev/pxa168fb.c