Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 23 Nov 2020 12:59:56 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r367951 - head/sys/dev/hptmv
Message-ID:  <202011231259.0ANCxuQD037980@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Mon Nov 23 12:59:56 2020
New Revision: 367951
URL: https://svnweb.freebsd.org/changeset/base/367951

Log:
  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.

Modified:
  head/sys/dev/hptmv/entry.c

Modified: head/sys/dev/hptmv/entry.c
==============================================================================
--- head/sys/dev/hptmv/entry.c	Mon Nov 23 12:57:24 2020	(r367950)
+++ head/sys/dev/hptmv/entry.c	Mon Nov 23 12:59:56 2020	(r367951)
@@ -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).
 	 */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202011231259.0ANCxuQD037980>