soc: qcom: rmtfs-mem: fix memleak in probe error paths
authorJohan Hovold <johan@kernel.org>
Tue, 12 Jun 2018 12:41:41 +0000 (14:41 +0200)
committerAndy Gross <andy.gross@linaro.org>
Sat, 21 Jul 2018 19:53:47 +0000 (14:53 -0500)
commit78ee559d7fc65e37670a46cfbeaaa62cb014af67
tree140cc553fac52324a07dd69fe557db7fec3105c4
parent4da3b0452bc66af8feca71b176668faf3d0e750d
soc: qcom: rmtfs-mem: fix memleak in probe error paths

Make sure to set the mem device release callback before calling
put_device() in a couple of probe error paths so that the containing
object also gets freed.

Fixes: d1de6d6c639b ("soc: qcom: Remote filesystem memory driver")
Cc: stable <stable@vger.kernel.org> # 4.15
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
drivers/soc/qcom/rmtfs_mem.c