summaryrefslogtreecommitdiff
path: root/sys/dev/usb
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2004-11-22 08:14:02 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2004-11-22 08:14:02 +0000
commit1bcf4689c84f5a4c468bbb6b1afcf2ecd440b00e (patch)
tree649eb462d8ff55c905e28fa56d9bca5843c7ea99 /sys/dev/usb
parent284b8b9a89afccc5f6734567f1d516b296b6c331 (diff)
cleaner handling of unknown radios
Diffstat (limited to 'sys/dev/usb')
-rw-r--r--sys/dev/usb/if_atu.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sys/dev/usb/if_atu.c b/sys/dev/usb/if_atu.c
index 1628e7f2192..ad6d3eb4939 100644
--- a/sys/dev/usb/if_atu.c
+++ b/sys/dev/usb/if_atu.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_atu.c,v 1.21 2004/11/21 04:55:36 dlg Exp $ */
+/* $OpenBSD: if_atu.c,v 1.22 2004/11/22 08:14:01 deraadt Exp $ */
/*
* Copyright (c) 2003, 2004
* Daan Vreeken <Danovitsch@Vitsch.net>. All rights reserved.
@@ -998,6 +998,7 @@ atu_upload_internal_firmware(struct atu_softc *sc)
name = "atu-intersil-int";
break;
default:
+ name = "unknown-device";
break;
}
@@ -1005,8 +1006,8 @@ atu_upload_internal_firmware(struct atu_softc *sc)
USBDEVNAME(sc->atu_dev), name));
err = loadfirmware(name, &firm, &bytes_left);
if (err != 0) {
- printf("%s: loadfirmware error %d\n",
- USBDEVNAME(sc->atu_dev), err);
+ printf("%s: %s loadfirmware error %d\n",
+ USBDEVNAME(sc->atu_dev), name, err);
return (err);
}
@@ -1157,7 +1158,7 @@ atu_upload_external_firmware(struct atu_softc *sc)
name = "atu-intersil-ext";
break;
default:
- bytes_left = 0;
+ name = "unknown-device";
break;
}
@@ -1165,8 +1166,8 @@ atu_upload_external_firmware(struct atu_softc *sc)
USBDEVNAME(sc->atu_dev), name));
err = loadfirmware(name, &firm, &bytes_left);
if (err != 0) {
- printf("%s: loadfirmware error %d\n",
- USBDEVNAME(sc->atu_dev), err);
+ printf("%s: %s loadfirmware error %d\n",
+ USBDEVNAME(sc->atu_dev), name, err);
return (err);
}
ptr = firm;