diff options
| author | droidfivex <droidfivex@gmail.com> | 2016-11-18 01:05:47 +0900 |
|---|---|---|
| committer | droidfivex <droidfivex@gmail.com> | 2016-11-18 01:05:47 +0900 |
| commit | 1e8e1576c95730e425f472a569bb15325329a99e (patch) | |
| tree | 66b14ebbc47c0bc6023aa57b91b1ab5a9ee6c8e6 /arch | |
| parent | 8b77716a2a034c7658ea6569ddaa814c312dd94f (diff) | |
| parent | 30bdd78c2f639b28acc02a4133479311e01b18ce (diff) | |
Diffstat (limited to 'arch')
| -rw-r--r-- | arch/arm/mach-msm/ipc_router.c | 4 | ||||
| -rw-r--r-- | arch/arm/mm/dma-mapping.c | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/arch/arm/mach-msm/ipc_router.c b/arch/arm/mach-msm/ipc_router.c index be7f218a691..15e18b7d89c 100644 --- a/arch/arm/mach-msm/ipc_router.c +++ b/arch/arm/mach-msm/ipc_router.c @@ -1,4 +1,4 @@ -/* Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. +/* Copyright (c) 2011-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 @@ -2492,7 +2492,7 @@ int msm_ipc_router_get_curr_pkt_size(struct msm_ipc_port *port_ptr) int msm_ipc_router_bind_control_port(struct msm_ipc_port *port_ptr) { - if (!port_ptr) + if (unlikely(!port_ptr || port_ptr->type != CLIENT_PORT)) return -EINVAL; down_write(&local_ports_lock_lha2); diff --git a/arch/arm/mm/dma-mapping.c b/arch/arm/mm/dma-mapping.c index 65d9ee41042..8420ccb15ed 100644 --- a/arch/arm/mm/dma-mapping.c +++ b/arch/arm/mm/dma-mapping.c @@ -474,6 +474,7 @@ static void *__alloc_from_pool(size_t size, struct page **ret_page) if (pageno < pool->nr_pages) { bitmap_set(pool->bitmap, pageno, count); ptr = pool->vaddr + PAGE_SIZE * pageno; + memset(ptr, 0, size); *ret_page = pool->page + pageno; } spin_unlock_irqrestore(&pool->lock, flags); |
