msm: lmh_lite: Pass proper size for dma memory free API call
Use proper size for dma memory free call API while saving lmh sensors list in lmh hardware driver otherwise it leads to memory leak or unexpected crash if scm_call error path is executed. CRs-Fixed: 982320 Change-Id: I31ac79585c8899b44ece745676d9af79fe8bca78 Signed-off-by: Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org>
This commit is contained in:
parent
186fb6e30c
commit
a981431516
|
@ -1,4 +1,4 @@
|
|||
/* Copyright (c) 2014-2015, The Linux Foundation. All rights reserved.
|
||||
/* Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License version 2 and
|
||||
|
@ -630,7 +630,8 @@ static int lmh_get_sensor_list(void)
|
|||
} while (next < size);
|
||||
|
||||
get_exit:
|
||||
dma_free_attrs(&dev, size, payload, payload_phys, &attrs);
|
||||
dma_free_attrs(&dev, PAGE_ALIGN(sizeof(struct lmh_sensor_packet)),
|
||||
payload, payload_phys, &attrs);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue