Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dkwedge Check dkdriver before calling a driver funct...
details: https://anonhg.NetBSD.org/src/rev/ad2e11751c15
branches: trunk
changeset: 976884:ad2e11751c15
user: mlelstv <mlelstv%NetBSD.org@localhost>
date: Tue Oct 06 15:05:54 2020 +0000
description:
Check dkdriver before calling a driver function.
diffstat:
sys/dev/dkwedge/dk.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 2575d61ef868 -r ad2e11751c15 sys/dev/dkwedge/dk.c
--- a/sys/dev/dkwedge/dk.c Tue Oct 06 13:42:03 2020 +0000
+++ b/sys/dev/dkwedge/dk.c Tue Oct 06 15:05:54 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dk.c,v 1.101 2020/05/24 14:40:21 jmcneill Exp $ */
+/* $NetBSD: dk.c,v 1.102 2020/10/06 15:05:54 mlelstv Exp $ */
/*-
* Copyright (c) 2004, 2005, 2006, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.101 2020/05/24 14:40:21 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dk.c,v 1.102 2020/10/06 15:05:54 mlelstv Exp $");
#ifdef _KERNEL_OPT
#include "opt_dkwedge.h"
@@ -1441,7 +1441,10 @@
dev = bp->b_dev;
bp->b_dev = sc->sc_pdev;
- (*sc->sc_parent->dk_driver->d_minphys)(bp);
+ if (sc->sc_parent->dk_driver && sc->sc_parent->dk_driver->d_minphys)
+ (*sc->sc_parent->dk_driver->d_minphys)(bp);
+ else
+ minphys(bp);
bp->b_dev = dev;
}
Home |
Main Index |
Thread Index |
Old Index