From: krw Date: Mon, 8 Jul 2024 16:07:36 +0000 (+0000) Subject: Don't check op_q_alloc for non-NULL before invoking op_q_free. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=e163d0c441df84dfd9550dff76b24500bb80bc27;p=openbsd Don't check op_q_alloc for non-NULL before invoking op_q_free. Check op_q_free for non-NULL instead. Neither are currently set to non-NULL anywhere. ok jmatthew@ --- diff --git a/sys/dev/ic/nvme.c b/sys/dev/ic/nvme.c index 62299a4de62..dcbf4018774 100644 --- a/sys/dev/ic/nvme.c +++ b/sys/dev/ic/nvme.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nvme.c,v 1.118 2024/06/30 12:03:17 krw Exp $ */ +/* $OpenBSD: nvme.c,v 1.119 2024/07/08 16:07:36 krw Exp $ */ /* * Copyright (c) 2014 David Gwynne @@ -1538,7 +1538,7 @@ nvme_q_free(struct nvme_softc *sc, struct nvme_queue *q) nvme_dmamem_sync(sc, q->q_cq_dmamem, BUS_DMASYNC_POSTREAD); nvme_dmamem_sync(sc, q->q_sq_dmamem, BUS_DMASYNC_POSTWRITE); - if (sc->sc_ops->op_q_alloc != NULL) + if (sc->sc_ops->op_q_free != NULL) sc->sc_ops->op_q_free(sc, q); nvme_dmamem_free(sc, q->q_cq_dmamem);