From 3bd46ad76df3fd156a370d642a59674c0d829d9e Mon Sep 17 00:00:00 2001 From: Edward Tomasz Napierala Date: Mon, 23 Nov 2020 12:59:56 +0000 Subject: [PATCH] Don't check return from xpt_alloc_ccb() for being NULL; since it's not the _nowait wariant, it cannot fail. Suggested by: mav MFC after: 2 weeks Sponsored by: NetApp, Inc. Sponsored by: Klara, Inc. --- sys/dev/hptmv/entry.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/dev/hptmv/entry.c b/sys/dev/hptmv/entry.c index 873d29d7c8d6..7fbcb3a16571 100644 --- a/sys/dev/hptmv/entry.c +++ b/sys/dev/hptmv/entry.c @@ -2008,15 +2008,10 @@ hpt_attach(device_t dev) } - if ((ccb = xpt_alloc_ccb()) != NULL) - { - ccb->ccb_h.pinfo.priority = 1; - ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; - } - else - { - return ENOMEM; - } + ccb = xpt_alloc_ccb(); + ccb->ccb_h.pinfo.priority = 1; + ccb->ccb_h.pinfo.index = CAM_UNQUEUED_INDEX; + /* * Create the device queue for our SIM(s). */