]> git.baikalelectronics.ru Git - kernel.git/commitdiff
firmware: tee_bnxt: Fix multiple call to tee_client_close_context
authorVikas Gupta <vikas.gupta@broadcom.com>
Mon, 6 Jan 2020 06:24:02 +0000 (11:54 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 6 Jan 2020 21:51:37 +0000 (13:51 -0800)
Fix calling multiple tee_client_close_context in case of shm allocation
fails.

Fixes: b9d244ae05c1 (“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>
drivers/firmware/broadcom/tee_bnxt_fw.c

index 5b7ef89eb70143875ad4dd6a1d07da0bfc67c973..ed10da5313e8652b3ff72bc16283a9315eb9370e 100644 (file)
@@ -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;