From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Campbell Subject: [PATCH 4/4] xen/arm: correctly handle an empty array of platform descs. Date: Mon, 13 May 2013 17:23:02 +0100 Message-ID: <1368462182-10317-4-git-send-email-ian.campbell@citrix.com> References: <1368462160.537.125.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1368462160.537.125.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: julien.grall@citrix.com, tim@xen.org, Ian Campbell , stefano.stabellini@eu.citrix.com List-Id: xen-devel@lists.xenproject.org This bit me midway through a bisect and the platform array shouldn't be empty anymore but lets be safe. Signed-off-by: Ian Campbell --- xen/arch/arm/platform.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/platform.c b/xen/arch/arm/platform.c index afda302..1335110 100644 --- a/xen/arch/arm/platform.c +++ b/xen/arch/arm/platform.c @@ -50,7 +50,7 @@ static void dump_platform_table(void) printk("Available platform support:\n"); - for ( p = _splatform; p != _eplatform; p++ ) + for ( p = _splatform; p < _eplatform; p++ ) printk(" - %s\n", p->name); } @@ -61,7 +61,7 @@ int __init platform_init(void) ASSERT(platform == NULL); /* Looking for the platform description */ - for ( platform = _splatform; platform != _eplatform; platform++ ) + for ( platform = _splatform; platform < _eplatform; platform++ ) { if ( platform_is_compatible(platform) ) break; -- 1.7.2.5