Module Name:    src
Committed By:   mrg
Date:           Fri Jan  2 20:42:44 UTC 2015

Modified Files:
        src/sys/dev/usb: umidi.c

Log Message:
actually fix one of the previous:  don't test for NULL after deref.


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/usb/umidi.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/dev/usb/umidi.c
diff -u src/sys/dev/usb/umidi.c:1.67 src/sys/dev/usb/umidi.c:1.68
--- src/sys/dev/usb/umidi.c:1.67	Fri Jan  2 16:38:45 2015
+++ src/sys/dev/usb/umidi.c	Fri Jan  2 20:42:44 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: umidi.c,v 1.67 2015/01/02 16:38:45 christos Exp $	*/
+/*	$NetBSD: umidi.c,v 1.68 2015/01/02 20:42:44 mrg Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012, 2014 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.67 2015/01/02 16:38:45 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: umidi.c,v 1.68 2015/01/02 20:42:44 mrg Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -493,8 +493,6 @@ umidi_open(void *addr,
 	KASSERT(mutex_owned(&sc->sc_lock));
 	DPRINTF(("umidi_open: sc=%p\n", sc));
 
-	if (!sc)
-		return ENXIO;
 	if (mididev->opened)
 		return EBUSY;
 	if (sc->sc_dying)

Reply via email to