Fix the error checking, broken on r273337, to _not_ ignore controller

errors.

Without this fix you can't even scan the bus (all operations will always
succeed).

MFC with:	r273337
Pointy hat to:	loos
This commit is contained in:
loos 2014-11-12 03:07:46 +00:00
parent 6810cd7aa8
commit 8fddc417c9

View File

@ -441,7 +441,7 @@ bcm_bsc_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs)
err = mtx_sleep(dev, &sc->sc_mtx, 0, "bsciow", hz);
/* Check for errors. */
if (err != 0 && (sc->sc_flags & BCM_I2C_ERROR))
if (err == 0 && (sc->sc_flags & BCM_I2C_ERROR))
err = EIO;
if (err != 0)
break;