misc: fastrpc: Rework fastrpc_req_munmap
authorAbel Vesa <abel.vesa@linaro.org>
Fri, 25 Nov 2022 07:14:01 +0000 (07:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 17:45:33 +0000 (18:45 +0100)
commit72fa6f7820c4cf96c5f7aabc4e54bdf52d1e2ac2
treec6738c244b250f69913a7bb3936fffd074289dbe
parent334f1a1cbe032d85fd58e771629e3a3b373b96d5
misc: fastrpc: Rework fastrpc_req_munmap

Move the lookup of the munmap request to the fastrpc_req_munmap and pass
on only the buf to the lower level fastrpc_req_munmap_impl. That way
we can use the lower level fastrpc_req_munmap_impl on error path in
fastrpc_req_mmap to free the buf without searching for the munmap
request it belongs to.

Co-developed-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20221125071405.148786-7-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c