diff options
| author | Manaf Meethalavalappu Pallikunhi <manafm@codeaurora.org> | 2016-02-26 18:12:15 +0530 |
|---|---|---|
| committer | David Keitel <dkeitel@codeaurora.org> | 2016-03-25 16:02:32 -0700 |
| commit | c35b73cf03157f8de4d6681d43abe9c3fdfbc906 (patch) | |
| tree | 7407333a552b4c0560ecad778a7db443cbc1ff43 | |
| parent | 9a11e439080d6e2768ffc222610ca782cdfb2286 (diff) | |
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>
| -rw-r--r-- | drivers/thermal/lmh_lite.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/thermal/lmh_lite.c b/drivers/thermal/lmh_lite.c index 7b6aa107231d..541a106a6bdb 100644 --- a/drivers/thermal/lmh_lite.c +++ b/drivers/thermal/lmh_lite.c @@ -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 @@ -704,7 +704,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; } |
