Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/prg-localcount2]: src/sys/dev Don't reference a known-NULL pointer, and ...
details: https://anonhg.NetBSD.org/src/rev/d1f301906831
branches: prg-localcount2
changeset: 823513:d1f301906831
user: pgoyette <pgoyette%NetBSD.org@localhost>
date: Thu Apr 27 23:18:21 2017 +0000
description:
Don't reference a known-NULL pointer, and remove duplicated calls to
mutex_enter() and mutex_exit()
diffstat:
sys/dev/md.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
diffs (44 lines):
diff -r 108808f34ba3 -r d1f301906831 sys/dev/md.c
--- a/sys/dev/md.c Thu Apr 27 12:07:23 2017 +0000
+++ b/sys/dev/md.c Thu Apr 27 23:18:21 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: md.c,v 1.78.6.1 2017/04/27 05:36:35 pgoyette Exp $ */
+/* $NetBSD: md.c,v 1.78.6.2 2017/04/27 23:18:21 pgoyette Exp $ */
/*
* Copyright (c) 1995 Gordon W. Ross, Leo Weppelman.
@@ -40,7 +40,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.78.6.1 2017/04/27 05:36:35 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: md.c,v 1.78.6.2 2017/04/27 23:18:21 pgoyette Exp $");
#ifdef _KERNEL_OPT
#include "opt_md.h"
@@ -294,7 +294,7 @@
sc = device_private(self);
if (sc == NULL) {
mutex_exit(&md_device_lock);
- device_release(sc->sc_dev);
+ device_release(self);
return ENOMEM;
}
}
@@ -450,7 +450,6 @@
bp->b_error = ENXIO;
goto done;
}
- mutex_enter(&sc->sc_lock);
mutex_enter(&sc->sc_lock);
@@ -499,8 +498,6 @@
}
mutex_exit(&sc->sc_lock);
- mutex_exit(&sc->sc_lock);
-
done:
biodone(bp);
if (sc != NULL)
Home |
Main Index |
Thread Index |
Old Index