diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-06-11 01:05:44 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2007-06-11 01:05:44 +0000 |
commit | 016fcdcb5e952ecbad9e2631f4b1413ab263f3e1 (patch) | |
tree | 02e71d5ed325ca00444694fc306a344d93a5c8c6 /sys | |
parent | 70d04703cb4be8de1cdc22be9b005e903ac76f42 (diff) |
usbd_devinfo_alloc() uses M_WAITOK so don't check return value.
From Karl Sjödahl <dunceor@gmail.com>
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/usb/uow.c | 9 | ||||
-rw-r--r-- | sys/dev/usb/uts.c | 9 |
2 files changed, 8 insertions, 10 deletions
diff --git a/sys/dev/usb/uow.c b/sys/dev/usb/uow.c index de924a5ca6e..f2a483c943e 100644 --- a/sys/dev/usb/uow.c +++ b/sys/dev/usb/uow.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uow.c,v 1.19 2007/06/10 14:49:01 mbalmer Exp $ */ +/* $OpenBSD: uow.c,v 1.20 2007/06/11 01:05:43 jsg Exp $ */ /* * Copyright (c) 2006 Alexander Yurchenko <grange@openbsd.org> @@ -115,10 +115,9 @@ uow_attach(struct device *parent, struct device *self, void *aux) /* Display device info string */ printf("\n"); - if ((devinfop = usbd_devinfo_alloc(uaa->device, 0)) != NULL) { - printf("%s: %s\n", sc->sc_dev.dv_xname, devinfop); - usbd_devinfo_free(devinfop); - } + devinfop = usbd_devinfo_alloc(uaa->device, 0); + printf("%s: %s\n", sc->sc_dev.dv_xname, devinfop); + usbd_devinfo_free(devinfop); /* Set USB configuration */ if ((error = usbd_set_config_no(sc->sc_udev, diff --git a/sys/dev/usb/uts.c b/sys/dev/usb/uts.c index 65d74ef3ce5..c4846692677 100644 --- a/sys/dev/usb/uts.c +++ b/sys/dev/usb/uts.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uts.c,v 1.13 2007/06/10 14:49:01 mbalmer Exp $ */ +/* $OpenBSD: uts.c,v 1.14 2007/06/11 01:05:43 jsg Exp $ */ /* * Copyright (c) 2007 Robert Nagy <robert@openbsd.org> @@ -150,10 +150,9 @@ uts_attach(struct device *parent, struct device *self, void *aux) /* Display device info string */ printf("\n"); - if ((devinfop = usbd_devinfo_alloc(uaa->device, 0)) != NULL) { - printf("%s: %s\n", sc->sc_dev.dv_xname, devinfop); - usbd_devinfo_free(devinfop); - } + devinfop = usbd_devinfo_alloc(uaa->device, 0); + printf("%s: %s\n", sc->sc_dev.dv_xname, devinfop); + usbd_devinfo_free(devinfop); /* Move the device into the configured state. */ if (usbd_set_config_index(uaa->device, UTS_CONFIG_INDEX, 1) != 0) { |