Module Name:    src
Committed By:   riastradh
Date:           Tue Aug 30 08:48:24 UTC 2022

Modified Files:
        src/sys/dev/ic: nvme.c

Log Message:
nvme(4): Actually check if bp is null as commented previously.

I had tested this change, but forgot to amend the commit before
exporting to CVS.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/ic/nvme.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/ic/nvme.c
diff -u src/sys/dev/ic/nvme.c:1.65 src/sys/dev/ic/nvme.c:1.66
--- src/sys/dev/ic/nvme.c:1.65	Tue Aug 30 01:13:10 2022
+++ src/sys/dev/ic/nvme.c	Tue Aug 30 08:48:24 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvme.c,v 1.65 2022/08/30 01:13:10 riastradh Exp $	*/
+/*	$NetBSD: nvme.c,v 1.66 2022/08/30 08:48:24 riastradh Exp $	*/
 /*	$OpenBSD: nvme.c,v 1.49 2016/04/18 05:59:50 dlg Exp $ */
 
 /*
@@ -18,7 +18,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.65 2022/08/30 01:13:10 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvme.c,v 1.66 2022/08/30 08:48:24 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -1867,7 +1867,7 @@ static struct nvme_ccb *
 nvme_ccb_get_bio(struct nvme_softc *sc, struct buf *bp,
     struct nvme_queue **selq)
 {
-	u_int cpuindex = cpu_index(bp->b_ci ? bp->b_ci : curcpu());
+	u_int cpuindex = cpu_index((bp && bp->b_ci) ? bp->b_ci : curcpu());
 
 	/*
 	 * Find a queue with available ccbs, preferring the originating

Reply via email to