diff options
author | Peng Fan | 2017-12-29 15:06:08 +0800 |
---|---|---|
committer | Heiko Schocher | 2018-01-16 06:59:39 +0100 |
commit | fb0128736b7bfb83b43a35211f603c74f8627eff (patch) | |
tree | 57662817f401b77e596aa70f96462f7da4623217 /drivers/i2c/mxc_i2c.c | |
parent | 34b0af83902d43c05aa57e96cc06c1d5b42259e2 (diff) |
i2c: mxc_i2c: Use or operation
The operation should be OR, not BIT OR.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'drivers/i2c/mxc_i2c.c')
-rw-r--r-- | drivers/i2c/mxc_i2c.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/mxc_i2c.c b/drivers/i2c/mxc_i2c.c index 205274e9476..79228c2757b 100644 --- a/drivers/i2c/mxc_i2c.c +++ b/drivers/i2c/mxc_i2c.c @@ -784,9 +784,9 @@ static int mxc_i2c_probe(struct udevice *bus) ret2 = gpio_request_by_name_nodev(offset_to_ofnode(node), "sda-gpios", 0, &i2c_bus->sda_gpio, GPIOD_IS_OUT); - if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) | - !dm_gpio_is_valid(&i2c_bus->scl_gpio) | - ret | ret2) { + if (!dm_gpio_is_valid(&i2c_bus->sda_gpio) || + !dm_gpio_is_valid(&i2c_bus->scl_gpio) || + ret || ret2) { dev_err(dev, "i2c bus %d at %lu, fail to request scl/sda gpio\n", bus->seq, i2c_bus->base); return -EINVAL; } |