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

firmware: tee_bnxt: Fix multiple call to tee_client_close_context

Fix calling multiple tee_client_close_context in case of shm allocation
fails.

Fixes: 246880958ac9 (“firmware: broadcom: add OP-TEE based BNXT f/w manager”)
Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vikas Gupta and committed by
David S. Miller
4012a6f2 d8dc2c96

-1
-1
drivers/firmware/broadcom/tee_bnxt_fw.c
··· 215 215 fw_shm_pool = tee_shm_alloc(pvt_data.ctx, MAX_SHM_MEM_SZ, 216 216 TEE_SHM_MAPPED | TEE_SHM_DMA_BUF); 217 217 if (IS_ERR(fw_shm_pool)) { 218 - tee_client_close_context(pvt_data.ctx); 219 218 dev_err(pvt_data.dev, "tee_shm_alloc failed\n"); 220 219 err = PTR_ERR(fw_shm_pool); 221 220 goto out_sess;