summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-02-25 21:38:57 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-02-25 21:38:57 +0000
commit8a36f69df1dda58a79be3750e436cd18faa146c4 (patch)
treeea5abb3fdf97bd496508b94ecbfa45ac22528561
parent9052cad422967f5d9209297c1a9af5856ac7326c (diff)
Make sure we print something for unidentified devices.
ok deraadt@
-rw-r--r--sys/dev/i2c/i2c_scan.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/i2c/i2c_scan.c b/sys/dev/i2c/i2c_scan.c
index b968850e3df..39547169f16 100644
--- a/sys/dev/i2c/i2c_scan.c
+++ b/sys/dev/i2c/i2c_scan.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: i2c_scan.c,v 1.69 2006/02/25 17:58:01 kettenis Exp $ */
+/* $OpenBSD: i2c_scan.c,v 1.70 2006/02/25 21:38:56 kettenis Exp $ */
/*
* Copyright (c) 2005 Theo de Raadt <deraadt@openbsd.org>
@@ -639,6 +639,11 @@ iic_probe(struct device *self, struct i2cbus_attach_args *iba, u_int8_t addr)
iic_dump(self, addr, name);
#endif /* I2C_DEBUG */
+#if !defined(I2C_VERBOSE) && !defined(I2C_DEBUG)
+ if (name == NULL)
+ name = "unknown";
+#endif
+
if (name) {
memset(&ia, 0, sizeof(ia));
ia.ia_tag = iba->iba_tag;