Skip to content
Snippets Groups Projects
Commit fb012873 authored by Peng Fan's avatar Peng Fan Committed by Heiko Schocher
Browse files

i2c: mxc_i2c: Use or operation


The operation should be OR, not BIT OR.

Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Cc: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
parent 34b0af83
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment