Module Name: src
Committed By: mrg
Date: Mon Sep 7 00:32:28 UTC 2020
Modified Files:
src/sys/dev/ic: nslm7x.c
Log Message:
don't call printf %s with a NULL.
To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.74 src/sys/dev/ic/nslm7x.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.73 src/sys/dev/ic/nslm7x.c:1.74
--- src/sys/dev/ic/nslm7x.c:1.73 Wed Jul 10 16:23:55 2019
+++ src/sys/dev/ic/nslm7x.c Mon Sep 7 00:32:28 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: nslm7x.c,v 1.73 2019/07/10 16:23:55 msaitoh Exp $ */
+/* $NetBSD: nslm7x.c,v 1.74 2020/09/07 00:32:28 mrg Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.73 2019/07/10 16:23:55 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.74 2020/09/07 00:32:28 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -2556,7 +2556,8 @@ wb_attach(struct lm_softc *sc)
DPRINTF(("%s: winbond chip id 0x%x\n", __func__, sc->chipid));
if ((prod = wb_lookup(sc, wb_products, sc->chipid)) != NULL) {
- switch (prod->str[0]) {
+ model = prod->str;
+ switch (model[0]) {
case 'W':
vendor = "Winbond";
break;
@@ -2570,7 +2571,6 @@ wb_attach(struct lm_softc *sc)
aprint_error_dev(dev, "Unknown model (%s)\n", model);
return -1;
}
- model = prod->str;
sensors = prod->sensors;
sc->refresh_sensor_data = wb_refresh_sensor_data;
if (prod->extattach != NULL)