Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic nvme(4): Actually check if bp is null as commente...



details:   https://anonhg.NetBSD.org/src/rev/6919afffb2cb
branches:  trunk
changeset: 369741:6919afffb2cb
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Aug 30 08:48:24 2022 +0000

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

diffstat:

 sys/dev/ic/nvme.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r f3247342f3e0 -r 6919afffb2cb sys/dev/ic/nvme.c
--- a/sys/dev/ic/nvme.c Tue Aug 30 08:17:15 2022 +0000
+++ b/sys/dev/ic/nvme.c Tue Aug 30 08:48:24 2022 +0000
@@ -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 @@
 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



Home | Main Index | Thread Index | Old Index