From 1771fc602a5cc78b4e4e4b1e3e7976a2cf1c4352 Mon Sep 17 00:00:00 2001
From: patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>
Date: Tue, 21 Dec 2010 01:45:08 +0000
Subject: [PATCH] backward comparison

git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@3205 42af7a65-404d-4744-a932-0658087f49c3
---
 arch/arm/src/lpc17xx/lpc17_usbhost.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/src/lpc17xx/lpc17_usbhost.c b/arch/arm/src/lpc17xx/lpc17_usbhost.c
index 02ed7b4cab..c8be22fad2 100755
--- a/arch/arm/src/lpc17xx/lpc17_usbhost.c
+++ b/arch/arm/src/lpc17xx/lpc17_usbhost.c
@@ -1369,8 +1369,8 @@ static int lpc17_transfer(FAR struct usbhost_driver_s *drvr,
   /* Allocate an IO buffer if the user buffer does not lie in AHB SRAM */
 
 #ifdef CONFIG_UBHOST_AHBIOBUFFERS
-  if ((uintptr_t)buffer >= LPC17_SRAM_BANK0 &&
-      (uintptr_t)buffer < (LPC17_SRAM_BANK0 + LPC17_SRAM_BANK0 + LPC17_SRAM_BANK0))
+  if ((uintptr_t)buffer < LPC17_SRAM_BANK0 ||
+      (uintptr_t)buffer >= (LPC17_SRAM_BANK0 + LPC17_SRAM_BANK0 + LPC17_SRAM_BANK0))
     {
       /* Allocate an IO buffer in AHB SRAM */
 
-- 
GitLab