From f9fb95ebc7ba2ff5353a0f5a359ab1803e9bfd7a Mon Sep 17 00:00:00 2001
From: Rebecca Schultz Zavin <rebecca@android.com>
Date: Thu, 30 Jun 2011 18:09:05 -0700
Subject: [PATCH 334/696] gpu: ion: Fix bug in ion_buffer_add

Signed-off-by: Rebecca Schultz Zavin <rebecca@android.com>
---
 drivers/gpu/ion/ion.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/ion/ion.c b/drivers/gpu/ion/ion.c
index 108469b..1d65d79 100644
--- a/drivers/gpu/ion/ion.c
+++ b/drivers/gpu/ion/ion.c
@@ -116,13 +116,14 @@ static void ion_buffer_add(struct ion_device *dev,
 		parent = *p;
 		entry = rb_entry(parent, struct ion_buffer, node);
 
-		if (buffer < entry)
+		if (buffer < entry) {
 			p = &(*p)->rb_left;
-		else if (buffer > entry)
+		} else if (buffer > entry) {
 			p = &(*p)->rb_right;
-		else
+		} else {
 			pr_err("%s: buffer already found.", __func__);
 			BUG();
+		}
 	}
 
 	rb_link_node(&buffer->node, parent, p);
-- 
1.7.1


