aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/usb/usb_dev.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2020-07-22 14:32:47 +0000
committerMark Johnston <markj@FreeBSD.org>2020-07-22 14:32:47 +0000
commit94140f4781f83c9e98f582439ed69d000ff0323a (patch)
treeeb82b0dcf8af2286a9f3eb52cf3cb34652ffa5c1 /sys/dev/usb/usb_dev.c
parent3b01bf881c848ba0be72fc74ba5eaa58c66c35e1 (diff)
Notes
Diffstat (limited to 'sys/dev/usb/usb_dev.c')
-rw-r--r--sys/dev/usb/usb_dev.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/sys/dev/usb/usb_dev.c b/sys/dev/usb/usb_dev.c
index 7860fb67e5fe..9e17dfdc09bf 100644
--- a/sys/dev/usb/usb_dev.c
+++ b/sys/dev/usb/usb_dev.c
@@ -386,13 +386,11 @@ usb_fifo_alloc(struct mtx *mtx)
struct usb_fifo *f;
f = malloc(sizeof(*f), M_USBDEV, M_WAITOK | M_ZERO);
- if (f != NULL) {
- cv_init(&f->cv_io, "FIFO-IO");
- cv_init(&f->cv_drain, "FIFO-DRAIN");
- f->priv_mtx = mtx;
- f->refcount = 1;
- knlist_init_mtx(&f->selinfo.si_note, mtx);
- }
+ cv_init(&f->cv_io, "FIFO-IO");
+ cv_init(&f->cv_drain, "FIFO-DRAIN");
+ f->priv_mtx = mtx;
+ f->refcount = 1;
+ knlist_init_mtx(&f->selinfo.si_note, mtx);
return (f);
}
@@ -2309,9 +2307,6 @@ usb_alloc_symlink(const char *target)
struct usb_symlink *ps;
ps = malloc(sizeof(*ps), M_USBDEV, M_WAITOK);
- if (ps == NULL) {
- return (ps);
- }
/* XXX no longer needed */
strlcpy(ps->src_path, target, sizeof(ps->src_path));
ps->src_len = strlen(ps->src_path);