Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/pci mfii: Don't panic on detach.
details: https://anonhg.NetBSD.org/src/rev/d8ca51844fea
branches: trunk
changeset: 370060:d8ca51844fea
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Sep 14 01:05:42 2022 +0000
description:
mfii: Don't panic on detach.
Call sysmon_envsys_destroy() and clear sc->sc_sme to NULL if
sysmon_envsys_register failed.
diffstat:
sys/dev/pci/mfii.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diffs (27 lines):
diff -r 1b6f5bdaa449 -r d8ca51844fea sys/dev/pci/mfii.c
--- a/sys/dev/pci/mfii.c Tue Sep 13 20:10:04 2022 +0000
+++ b/sys/dev/pci/mfii.c Wed Sep 14 01:05:42 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.26 2022/07/16 07:23:51 msaitoh Exp $ */
+/* $NetBSD: mfii.c,v 1.27 2022/09/14 01:05:42 msaitoh Exp $ */
/* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
/*
@@ -19,7 +19,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.26 2022/07/16 07:23:51 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.27 2022/09/14 01:05:42 msaitoh Exp $");
#include "bio.h"
@@ -3982,6 +3982,8 @@
if (rv) {
aprint_error_dev(sc->sc_dev,
"unable to register with sysmon (rv = %d)\n", rv);
+ sysmon_envsys_destroy(sc->sc_sme);
+ sc->sc_sme = NULL;
}
return rv;
Home |
Main Index |
Thread Index |
Old Index