From: jsg Date: Fri, 19 Aug 2016 05:25:08 +0000 (+0000) Subject: avoid using an uninitialised variable with zero length iic_exec calls X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6f3f6514cb65cb5da6813cbd536a590602358888;p=openbsd avoid using an uninitialised variable with zero length iic_exec calls --- 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));