[PATCH] serial_s3c24x0: Add missing brackets.

Marek Belisko marek.belisko at gmail.com
Mon Nov 15 09:17:19 EST 2010


Fucntion s3c24x0_serial_flush() could behave wrong
because of missing brackets. Correct condition logic.
Problem found by sparse.

Signed-off-by: Marek Belisko <marek.belisko at gmail.com>
---
 drivers/serial/serial_s3c24x0.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/serial/serial_s3c24x0.c b/drivers/serial/serial_s3c24x0.c
index fedddd3..d7eac8f 100644
--- a/drivers/serial/serial_s3c24x0.c
+++ b/drivers/serial/serial_s3c24x0.c
@@ -113,7 +113,7 @@ static void s3c24x0_serial_flush(struct console_device *cdev)
 {
 	struct device_d *dev = cdev->dev;
 
-	while (!readb(dev->map_base + UTRSTAT) & 0x4)
+	while (!(readb(dev->map_base + UTRSTAT) & 0x4))
 		;
 }
 
-- 
1.7.1




More information about the barebox mailing list