Skip to content

Commit

Permalink
firmware: tee_bnxt: Fix multiple call to tee_client_close_context
Browse files Browse the repository at this point in the history
Fix calling multiple tee_client_close_context in case of shm allocation
fails.

Fixes: 2468809 (“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>
  • Loading branch information
vikasbrcm authored and davem330 committed Jan 6, 2020
1 parent d8dc2c9 commit 4012a6f
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/firmware/broadcom/tee_bnxt_fw.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ static int tee_bnxt_fw_probe(struct device *dev)
fw_shm_pool = tee_shm_alloc(pvt_data.ctx, MAX_SHM_MEM_SZ,
TEE_SHM_MAPPED | TEE_SHM_DMA_BUF);
if (IS_ERR(fw_shm_pool)) {
tee_client_close_context(pvt_data.ctx);
dev_err(pvt_data.dev, "tee_shm_alloc failed\n");
err = PTR_ERR(fw_shm_pool);
goto out_sess;
Expand Down

0 comments on commit 4012a6f

Please sign in to comment.