mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
IB/ehca: use kvfree() in ipz_queue_{cd}tor()
Use kvfree() instead of open-coding it. Signed-off-by: Pekka Enberg <[email protected]> Cc: Hoang-Nam Nguyen <[email protected]> Cc: Christoph Raisch <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
48a20138ab
commit
f8c5b93947
1 changed files with 2 additions and 8 deletions
|
|
@ -245,10 +245,7 @@ int ipz_queue_ctor(struct ehca_pd *pd, struct ipz_queue *queue,
|
|||
ipz_queue_ctor_exit0:
|
||||
ehca_gen_err("Couldn't alloc pages queue=%p "
|
||||
"nr_of_pages=%x", queue, nr_of_pages);
|
||||
if (is_vmalloc_addr(queue->queue_pages))
|
||||
vfree(queue->queue_pages);
|
||||
else
|
||||
kfree(queue->queue_pages);
|
||||
kvfree(queue->queue_pages);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -270,10 +267,7 @@ int ipz_queue_dtor(struct ehca_pd *pd, struct ipz_queue *queue)
|
|||
free_page((unsigned long)queue->queue_pages[i]);
|
||||
}
|
||||
|
||||
if (is_vmalloc_addr(queue->queue_pages))
|
||||
vfree(queue->queue_pages);
|
||||
else
|
||||
kfree(queue->queue_pages);
|
||||
kvfree(queue->queue_pages);
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue