svn commit: r367951 - head/sys/dev/hptmv

Edward Tomasz Napierala trasz at FreeBSD.org
Mon Nov 23 12:59:56 UTC 2020


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).
 	 */


More information about the svn-src-head mailing list