From a65a906e9e6f8cbafdc58b6f4ec5d3290d7aef55 Mon Sep 17 00:00:00 2001 From: Brendan Le Foll Date: Mon, 29 Dec 2014 14:41:22 +0000 Subject: [PATCH] i2c: fix brackets around if statement Signed-off-by: Brendan Le Foll --- src/i2c/i2c.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/i2c/i2c.c b/src/i2c/i2c.c index da9da0d..2386827 100644 --- a/src/i2c/i2c.c +++ b/src/i2c/i2c.c @@ -89,18 +89,20 @@ mraa_i2c_init(int bus) } int pos = plat->i2c_bus[bus].sda; - if (plat->pins[pos].i2c.mux_total > 0) + if (plat->pins[pos].i2c.mux_total > 0) { if (mraa_setup_mux_mapped(plat->pins[pos].i2c) != MRAA_SUCCESS) { syslog(LOG_ERR, "i2c: Failed to set-up i2c sda multiplexer"); return NULL; } + } pos = plat->i2c_bus[bus].scl; - if (plat->pins[pos].i2c.mux_total > 0) + if (plat->pins[pos].i2c.mux_total > 0) { if (mraa_setup_mux_mapped(plat->pins[pos].i2c) != MRAA_SUCCESS) { syslog(LOG_ERR, "i2c: Failed to set-up i2c scl multiplexer"); return NULL; } + } return mraa_i2c_init_raw((unsigned int) plat->i2c_bus[bus].bus_id); }