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/amdpm.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/amdpm.c')
-rw-r--r-- | sys/dev/pci/amdpm.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/amdpm.c b/sys/dev/pci/amdpm.c index ae7baae9e43..81063f43fc0 100644 --- a/sys/dev/pci/amdpm.c +++ b/sys/dev/pci/amdpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: amdpm.c,v 1.27 2012/08/16 18:41:17 tedu Exp $ */ +/* $OpenBSD: amdpm.c,v 1.28 2012/10/05 10:51:28 haesbaert Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -455,6 +455,8 @@ amdpm_i2c_exec(void *cookie, i2c_op_t op, i2c_addr_t addr, ctl = AMDPM_SMBCTL_CMD_BDATA; else if (len == 2) ctl = AMDPM_SMBCTL_CMD_WDATA; + else + panic("%s: unexpected len %zd", __func__, len); if ((flags & I2C_F_POLL) == 0) ctl |= AMDPM_SMBCTL_CYCEN; |