Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753223AbcJCMVv (ORCPT ); Mon, 3 Oct 2016 08:21:51 -0400 Received: from mga03.intel.com ([134.134.136.65]:47022 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752713AbcJCMVo (ORCPT ); Mon, 3 Oct 2016 08:21:44 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.31,289,1473145200"; d="scan'208";a="1048854146" Date: Mon, 3 Oct 2016 15:21:35 +0300 From: Jarkko Sakkinen To: Jason Gunthorpe Cc: Peter Huewe , Nayna Jain , Marcel Selhorst , "moderated list:TPM DEVICE DRIVER" , open list Subject: Re: [PATCH RESEND 2/3] tpm: replace dynamically allocated bios_dir with a static array Message-ID: <20161003122135.GB9990@intel.com> References: <1475349926-476-1-git-send-email-jarkko.sakkinen@linux.intel.com> <1475349926-476-3-git-send-email-jarkko.sakkinen@linux.intel.com> <20161002212801.GC25872@obsidianresearch.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161002212801.GC25872@obsidianresearch.com> Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 387 Lines: 14 On Sun, Oct 02, 2016 at 03:28:01PM -0600, Jason Gunthorpe wrote: > On Sat, Oct 01, 2016 at 10:25:25PM +0300, Jarkko Sakkinen wrote: > > > + for (i = (TPM_NUM_EVENT_LOG_FILES - 1); i >= 0; i--) { > > + if (chip->bios_dir[i]) > > The entries can't actually be null here, right? They can because this function is called as a rollbcak procedure for tpm_bios_log_setup. > Jason /Jarkko