From: Rebecca Schultz Zavin Date: Fri, 1 Jul 2011 01:09:05 +0000 (-0700) Subject: gpu: ion: Fix bug in ion_buffer_add X-Git-Tag: 2.1b_release~2548 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=747e1bc9e09f3c5fd613f9ba722a25708ec9818a;p=kernel%2Fkernel-mfld-blackbay.git gpu: ion: Fix bug in ion_buffer_add Signed-off-by: Rebecca Schultz Zavin --- 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);