From 016fcdcb5e952ecbad9e2631f4b1413ab263f3e1 Mon Sep 17 00:00:00 2001 From: Jonathan Gray Date: Mon, 11 Jun 2007 01:05:44 +0000 Subject: =?UTF-8?q?usbd=5Fdevinfo=5Falloc()=20uses=20M=5FWAITOK=20so=20don?= =?UTF-8?q?'t=20check=20return=20value.=20From=20Karl=20Sj=C3=B6dahl=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sys/dev/usb/uow.c | 9 ++++----- 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 @@ -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 @@ -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) { -- cgit v1.2.3