Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp421132pxb; Fri, 15 Jan 2021 17:27:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJzu9b0NkfvMvRy+S3ZCt6bAGYZE07gIdXVsI0bbgAjTlR1BaKflQaH8czDVKFTuQX0sPD+t X-Received: by 2002:a17:906:144e:: with SMTP id q14mr10562958ejc.150.1610760430585; Fri, 15 Jan 2021 17:27:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610760430; cv=none; d=google.com; s=arc-20160816; b=uBYH8DawHq7tOvBLH963THQjHbuaQlQYnQTEjDKeBys1jS3+E2BPDkqG4/XqPEiGSR ohO5aflMwp5P1d8EeQYf7TV9o5q4tVCxkxK8/Ic/KF13xVykwwS+NP+lzxYSCK/fQcNP SiCGqNZnO7wUqWpj+84v9wgemqZLX6jn4H4NypyxCufgsIjhAYUgrWhn1gWNJXCf9CDQ Mu8RB3s4HaxbA9LvFxpGS6pVwaUYTuUnd6GJExxhXAo3KorF/cz7qMpv+Dqtgq1wtED8 Pb7C4l1evWdG+JmmNLzMpgU6FebJMovYEqsDsv9BwMnpy3LDn9NRZMwUFhnYcUdFZZ5t ujpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=F2qbFf9qKdSsBJa23tXe6T1HNDHCDzPhYtNTXVVRWNI=; b=NPNkfwCxie7lxKkLiXOydl+PmOAoNOFPUIsGbwD/Vv0zkSQsKoI+uWRj+e5mPmL/2f XIUCJBqdjS8V+W0SCMl9S3YXipKoGWXSZhKxOgeeEZSMesEQILBv/EKbVarnZ+G199v5 a3YQVOkpl9xefrqYyWkihDBiejeiPUQUlleLPsm/FiDrCHarzVr1bzCfsLzIhLrdZ8Fs Y03qg8TKMcqFnO1Z75lOlz81TvZ/ZlTIMJPQBDkKc6dxuwy51XETiAsg9y+ykzPt5Ebc wBTAQR+uf7Ue5CgFeVe4hYD9I7bJAx2WTRxIBuamJJ0ggTwk9h/1rbmlj3V+o53eDJid Z7qA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=cGv3Il2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q21si4536791ejd.515.2021.01.15.17.26.47; Fri, 15 Jan 2021 17:27:10 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=cGv3Il2t; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmx.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727649AbhAPBZS (ORCPT + 99 others); Fri, 15 Jan 2021 20:25:18 -0500 Received: from mout.gmx.net ([212.227.15.18]:56503 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726194AbhAPBZR (ORCPT ); Fri, 15 Jan 2021 20:25:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610760218; bh=F2qbFf9qKdSsBJa23tXe6T1HNDHCDzPhYtNTXVVRWNI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=cGv3Il2tFQ+HsVAoOo36bWX56A+r6RminW/Q8CypSWJvSj2gRxWP9zUgK5oWVT/F7 t5NyZ8d4pvcnVclZxPJF/Ws6onII2AOJ4aJLNj8fHJFgReEYno2RE3/udJO8M52orI uuhPPUhcOjeo1OAaj7JnchieBoGLzjfNkVQkllIY= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from Venus.fritz.box ([78.42.220.31]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1N0X8o-1lwyK62LEi-00wXvB; Sat, 16 Jan 2021 02:23:38 +0100 From: Lino Sanfilippo To: peterhuewe@gmx.de, jarkko@kernel.org Cc: jgg@ziepe.ca, stefanb@linux.vnet.ibm.com, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, LinoSanfilippo@gmx.de, p.rosenberger@kunbus.com, Lino Sanfilippo Subject: [PATCH 4/4] tpm: Provide a function tpm_chip_free() to free tpm chips Date: Sat, 16 Jan 2021 02:22:41 +0100 Message-Id: <1610760161-21982-5-git-send-email-LinoSanfilippo@gmx.de> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1610760161-21982-1-git-send-email-LinoSanfilippo@gmx.de> References: <1610760161-21982-1-git-send-email-LinoSanfilippo@gmx.de> MIME-Version: 1.0 Content-Transfer-Encoding: base64 X-Provags-ID: V03:K1:7LO2kLHLpuJ1Obj7yG/NKIjDEnDYivUDdHMjXgTExtjAzWCbONM mTIDxVRb3DLKOuFTtshO/Xwgch1z04dQ4gOlbl6toVDX0FadqCJjQy7N/R21/XWbi2euEwV jbxGtsjBnoeq8TbX+fQ4dmuJxEQa3HbuTMQwFxMuREAibhbOr5NjWjU39IviBeQxiVdfsiV qDNc/UlcPcGOCFy543LEA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:mwMJBVypbFI=:rVDhbqRFT9bOq2TPD8SKJi zCHkp9PfQMxP4PWG7uMdIbf32zrVhLl6HfSc55JyR+VuuwEgcML4WOJLzYf4BEa7eDceXBdx1 5qa87L/OsSuZeWf2OhF0fxGtnSYo3NbFlDTSFuYz+AzFyXDlFJq9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