mirror of
https://github.com/torvalds/linux.git
synced 2024-11-27 14:41:39 +00:00
[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>
This commit is contained in:
parent
47de9bf893
commit
c1ae8f3ad8
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user