Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

rtc: optee: fix memory leak on driver removal

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: 81c2f059ab90 ("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>

authored by

Clément Le Goffic and committed by
Alexandre Belloni
a531350d 606d19ee

+1
+1
drivers/rtc/rtc-optee.c
··· 320 320 { 321 321 struct optee_rtc *priv = dev_get_drvdata(dev); 322 322 323 + tee_shm_free(priv->shm); 323 324 tee_client_close_session(priv->ctx, priv->session_id); 324 325 tee_client_close_context(priv->ctx); 325 326