[PATCH] bsp/raspberrypi: Move assignment outside if-condition

Jan Sommer soja-lists at aries.uberspace.de
Wed Dec 30 00:09:34 UTC 2015


Assignment was misplaced by one line.
---
 c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
index 6d9a2cd..9bf90ec 100644
--- a/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
+++ b/c/src/lib/libbsp/arm/raspberrypi/i2c/i2c.c
@@ -91,8 +91,8 @@ static int rpi_i2c_bus_transfer(rpi_i2c_bus *bus)
       BCM2835_REG(BCM2835_I2C_C) |= (1 << 9);
 
       /* Sleep until the TX FIFO has free space for a new write. */
+      bus->task_id = rtems_task_self();
       if (
-          bus->task_id = rtems_task_self();
           rtems_event_transient_receive(RTEMS_WAIT, bus->base.timeout) !=
           RTEMS_SUCCESSFUL
       ) {
-- 
2.5.0



More information about the devel mailing list