misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail
authorAbel Vesa <abel.vesa@linaro.org>
Fri, 25 Nov 2022 07:14:00 +0000 (07:14 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 17:45:33 +0000 (18:45 +0100)
commit334f1a1cbe032d85fd58e771629e3a3b373b96d5
treeb89425f88e72705774d26bed93e7ee8666537874
parent6f18c7e845346f365e08613fdc47a60fc201aedb
misc: fastrpc: Use fastrpc_map_put in fastrpc_map_create on fail

Move the kref_init right after the allocation so that we can use
fastrpc_map_put on any following error case.

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-6-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/fastrpc.c