rtc: optee: fix memory leak on driver removal
[ Upstream commit a531350d2fe58f7fc4516e555f22391dee94efd9 ]
Fix a memory leak in case of driver removal.
Free the shared memory used for arguments exchanges between kernel and
OP-TEE RTC PTA.
Fixes: 81c2f059ab ("rtc: optee: add RTC driver for OP-TEE RTC PTA")
Signed-off-by: Clément Le Goffic <clement.legoffic@foss.st.com>
Link: https://lore.kernel.org/r/20250715-upstream-optee-rtc-v1-1-e0fdf8aae545@foss.st.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
646e5f4c88
commit
f9d4ec7d13
@@ -320,6 +320,7 @@ static int optee_rtc_remove(struct device *dev)
|
||||
{
|
||||
struct optee_rtc *priv = dev_get_drvdata(dev);
|
||||
|
||||
tee_shm_free(priv->shm);
|
||||
tee_client_close_session(priv->ctx, priv->session_id);
|
||||
tee_client_close_context(priv->ctx);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user