Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp18754496ybl; Fri, 3 Jan 2020 08:26:23 -0800 (PST) X-Google-Smtp-Source: APXvYqygfNpKLKmQ06JIv2kRZML//R1cmy9bG/oE0XemhS2CkttiTcJDKf0ln1VcRf0Egmx6h0aX X-Received: by 2002:a05:6830:1d6a:: with SMTP id l10mr101909591oti.233.1578068783285; Fri, 03 Jan 2020 08:26:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578068783; cv=none; d=google.com; s=arc-20160816; b=mjwDF9anqM9d8YsLFNxL+ZXgRhi8z/MdpqFPWcVEaH5HYDwp974NcNF2TzITPi9ZPA EdgG5B3F5brKhzo5vrT1OPsQz6ojGaP21s30EiwNlOscEZm2E1y84TNtEhT4JE8OnTXr LXXObSphnIGt3WcyT7k9gm1xo2Xqg8AVnFeU53M5P+U4zL6s49mhphBunnIuGN2grx7N 5Yx5embPKvLJ1NUHj7XTAuEECPhHSdDIf+Wnpz/U4JWVqNVjTRRnljgfA9O/SuLktGeM AbXIJtJSR1WNd9j+wVuHTOu7VwRW7XhJMZ3FAPX3gm+98mLAUpeEpOJ/RzyrtXpeFPU3 enPg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=evzD0JK8LSn0ZimlzI9kK570jZJqixSLv6BagHOwVBY=; b=dO4YBcVTZTsiMF02opKH24z4ANxGtXMS+4CwCatgCziItKF25LL+IRFS3MgBjvKDqo M5rRnpgyFMH3/4xN3TVh9Afj+/b6JBe5vcJ3uNkL5rvwpSiRjv0MwX8SDrrTrxGIyp9S xPeFQQwLdrNjV45vub1ofxQk5THTyz6Mma9Hw2ip2aixsnEG/ga1yc5UNUbIREAtuQLo uAU0DaIGp6krQmH2LplAVV+jeJ1I4AOPPziuInm/PqjbhbDTOIIezeN5y30VDVqlrf1p yy5K7k8huLjNd66XNkFw2sRFdpzDJBYFCjyR45wj/0Zc3XKulLt1I0xoQ17lZDlWt8av ZL+g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="D/uyn74N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j70si29801869oib.219.2020.01.03.08.26.11; Fri, 03 Jan 2020 08:26:23 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b="D/uyn74N"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727965AbgACQWV (ORCPT + 99 others); Fri, 3 Jan 2020 11:22:21 -0500 Received: from mail-wr1-f41.google.com ([209.85.221.41]:45632 "EHLO mail-wr1-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727930AbgACQWU (ORCPT ); Fri, 3 Jan 2020 11:22:20 -0500 Received: by mail-wr1-f41.google.com with SMTP id j42so42895491wrj.12 for ; Fri, 03 Jan 2020 08:22:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=evzD0JK8LSn0ZimlzI9kK570jZJqixSLv6BagHOwVBY=; b=D/uyn74NsoOZZDLoIBT+vfDAvfmrTzLUJeeDoSF7hwDTrWW/WKVhaHDcSw4cZZ9dTJ MVssK1EjiDi8P1W38Rij0dce0rgE9AgN0TQFUDTiqFUQLVrhhgCJaUToyh6RWk3kHFXl bBXo/jWS7LgapOUmHOth+KmYm80IE9FpQ1j4E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=evzD0JK8LSn0ZimlzI9kK570jZJqixSLv6BagHOwVBY=; b=E8CuUQH7MUD0LY9EfT2R9wk5W0Q8oRCeLyjAs1TO4QxsOIRoWLXtT0RoEZfDSuKpRY KSK8fvuTuB2J8jdVpYUpFb+ynYjzXKslJAE+jAw0WkxPr+c4RCM51pQd3fgCFw5+9Fa+ syzgR7LX3+I+HyeTbvOq1kqZ+Xeil4J60y4CFS+U7UbynPrXNr/kJCP0VT+GcgiFvTps OdTnnAJnV8yoAT45TPxZAye2FM29OnxlQlZCsLZ3U0U54sdPLbrt4152HtXmW3Me6LAI Jh3yCnMdd98Z53sVMFVjAbSt20vy0gvoqq+uBAnaFGDxB4KZRugirl/iJxNxRNi7/yuP p1Xw== X-Gm-Message-State: APjAAAXGznDCzcZxi4f3gypi65uFF+JgNOx7QPDWYfVkfXYiicylIQB9 wzU21twTadb1kaWREr0uhRnfNA== X-Received: by 2002:a5d:6144:: with SMTP id y4mr90610098wrt.367.1578068538425; Fri, 03 Jan 2020 08:22:18 -0800 (PST) Received: from Ninja.ibn.broadcom.net ([192.19.234.250]) by smtp.gmail.com with ESMTPSA id n8sm61348706wrx.42.2020.01.03.08.22.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 03 Jan 2020 08:22:17 -0800 (PST) From: Vikas Gupta To: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= , "David S. Miller" , Sheetal Tigadoli , netdev@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, Sumit Garg Cc: vasundhara-v.volam@broadcom.com, vikram.prakash@broadcom.com, Vikas Gupta Subject: [PATCH INTERNAL v2] firmware: tee_bnxt: Fix multiple call to tee_client_close_context Date: Fri, 3 Jan 2020 21:50:03 +0530 Message-Id: <1578068404-26195-1-git-send-email-vikas.gupta@broadcom.com> X-Mailer: git-send-email 1.9.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- drivers/firmware/broadcom/tee_bnxt_fw.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/firmware/broadcom/tee_bnxt_fw.c b/drivers/firmware/broadcom/tee_bnxt_fw.c index 5b7ef89..ed10da5 100644 --- a/drivers/firmware/broadcom/tee_bnxt_fw.c +++ b/drivers/firmware/broadcom/tee_bnxt_fw.c @@ -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; -- 2.7.4