diff options
author | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-10-05 10:51:29 +0000 |
---|---|---|
committer | Christiano F. Haesbaert <haesbaert@cvs.openbsd.org> | 2012-10-05 10:51:29 +0000 |
commit | ac70364f9c3148c8006cd01b7e152df220bb5ba6 (patch) | |
tree | e82a0491370ea7e85f58cd4fec401883891b098a /sys/dev/pci/viapm.c | |
parent | 9c3f569a5c4f292478d96d01b01ae81aa26b5a27 (diff) |
Avoid uninitiliazed use of ctl and corresponding warnings.
Part of the work to remove -Wno-uninitialized.
ok kettenis@
Diffstat (limited to 'sys/dev/pci/viapm.c')
-rw-r--r-- | sys/dev/pci/viapm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/viapm.c b/sys/dev/pci/viapm.c index cbf20ffd588..4977a6e1591 100644 --- a/sys/dev/pci/viapm.c +++ b/sys/dev/pci/viapm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: viapm.c,v 1.15 2012/08/16 18:41:17 tedu Exp $ */ +/* $OpenBSD: viapm.c,v 1.16 2012/10/05 10:51:28 haesbaert Exp $ */ /* * Copyright (c) 2005 Mark Kettenis <kettenis@openbsd.org> @@ -576,6 +576,8 @@ viapm_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, ctl = VIAPM_SMB_HC_CMD_BDATA; else if (len == 2) ctl = VIAPM_SMB_HC_CMD_WDATA; + else + panic("%s: unexpected len %zd", __func__, len); if ((flags & I2C_F_POLL) == 0) ctl |= VIAPM_SMB_HC_INTREN; |