summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/davinci
diff options
context:
space:
mode:
authorAl Viro <viro@ZenIV.linux.org.uk>2015-12-12 22:32:01 -0200
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2016-01-25 15:15:26 -0200
commitc1ae8f3ad8758b588b4ba02edcb8d413185a10d7 (patch)
treee8d5c9ac7fd7026fb045b73c79a532987dbb0229 /drivers/media/platform/davinci
parent47de9bf8931e6bf9c92fdba9867925d1ce482ab1 (diff)
downloadlinux-c1ae8f3ad8758b588b4ba02edcb8d413185a10d7.tar.bz2
[media] davinci: ccdc_update_raw_params() frees the wrong thing
Passing a physical address to free_pages() is a bad idea. config_params->fault_pxl.fpc_table_addr is set to virt_to_phys() of __get_free_pages() return value; what we should pass to free_pages() is its phys_to_virt(). ccdc_close() does that properly, but ccdc_update_raw_params() doesn't. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/davinci')
-rw-r--r--drivers/media/platform/davinci/dm644x_ccdc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/platform/davinci/dm644x_ccdc.c b/drivers/media/platform/davinci/dm644x_ccdc.c
index ffbefdff6b5e..6fba32bec974 100644
--- a/drivers/media/platform/davinci/dm644x_ccdc.c
+++ b/drivers/media/platform/davinci/dm644x_ccdc.c
@@ -261,7 +261,7 @@ static int ccdc_update_raw_params(struct ccdc_config_params_raw *raw_params)
*/
if (raw_params->fault_pxl.fp_num != config_params->fault_pxl.fp_num) {
if (fpc_physaddr != NULL) {
- free_pages((unsigned long)fpc_physaddr,
+ free_pages((unsigned long)fpc_virtaddr,
get_order
(config_params->fault_pxl.fp_num *
FP_NUM_BYTES));