Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754829AbcKQRgp (ORCPT ); Thu, 17 Nov 2016 12:36:45 -0500 Received: from mga07.intel.com ([134.134.136.100]:49757 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754065AbcKQRgn (ORCPT ); Thu, 17 Nov 2016 12:36:43 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,506,1473145200"; d="scan'208";a="787667986" Date: Thu, 17 Nov 2016 09:36:41 -0800 From: Jarkko Sakkinen To: Nayna Cc: tpmdd-devel@lists.sourceforge.net, Christophe Ricard , open list , linux-security-module@vger.kernel.org Subject: Re: [tpmdd-devel] [PATCH] tpm: drop chip->is_open and chip->duration_adjusted Message-ID: <20161117173641.uppc5vetyfuab7ts@intel.com> References: <20161114234500.24839-1-jarkko.sakkinen@linux.intel.com> <582D891D.9000801@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <582D891D.9000801@linux.vnet.ibm.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 391 Lines: 13 On Thu, Nov 17, 2016 at 04:10:29PM +0530, Nayna wrote: > On 11/15/2016 05:14 AM, Jarkko Sakkinen wrote: > > - if (chip->flags & (TPM_CHIP_FLAG_TPM2 | TPM_CHIP_FLAG_VIRTUAL)) > > - return 0; > > + if (test_bit(TPM_CHIP_FLAG_TPM2, &chip->flags) || > > + test_bit(TPM_CHIP_FLAG_VIRTUAL, &chip->flags)) > > + return; > > guess should be "return 0;" Ouch. Good catch. Thank you. /Jarkko