diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-08-19 05:25:09 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2016-08-19 05:25:09 +0000 |
commit | bb045592454fbc624ee094b3e42fdb8a7437b14b (patch) | |
tree | 1d83f2939731cf9b1fe8577ccfb0a4e564564062 | |
parent | a9bd86c3de2e360f70a4259a4fcf1fa491305c89 (diff) |
avoid using an uninitialised variable with zero length iic_exec calls
-rw-r--r-- | sys/arch/armv7/omap/ti_iic.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/armv7/omap/ti_iic.c b/sys/arch/armv7/omap/ti_iic.c index d454a8cdb9c..8eeb6bd7fd4 100644 --- a/sys/arch/armv7/omap/ti_iic.c +++ b/sys/arch/armv7/omap/ti_iic.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ti_iic.c,v 1.9 2016/08/12 03:22:41 jsg Exp $ */ +/* $OpenBSD: ti_iic.c,v 1.10 2016/08/19 05:25:08 jsg Exp $ */ /* $NetBSD: ti_iic.c,v 1.4 2013/04/25 13:04:27 rkujawa Exp $ */ /* @@ -268,8 +268,7 @@ ti_iic_exec(void *opaque, i2c_op_t op, i2c_addr_t addr, const void *cmdbuf, size_t cmdlen, void *buf, size_t len, int flags) { struct ti_iic_softc *sc = opaque; - int err; - + int err = 0; DPRINTF(("ti_iic_exec: op 0x%x cmdlen %zd len %zd flags 0x%x\n", op, cmdlen, len, flags)); |