Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev Ignore return values when backing out of a "finish" ...



details:   https://anonhg.NetBSD.org/src/rev/8163d792ca17
branches:  trunk
changeset: 816993:8163d792ca17
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Aug 05 08:21:24 2016 +0000

description:
Ignore return values when backing out of a "finish" sequence.  There
really shouldn't be any errors here (we're just putting something back
that previously existed), and a panic() would be rather drastic.

diffstat:

 sys/dev/vnd.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (38 lines):

diff -r 4cd2479e5287 -r 8163d792ca17 sys/dev/vnd.c
--- a/sys/dev/vnd.c     Fri Aug 05 07:22:17 2016 +0000
+++ b/sys/dev/vnd.c     Fri Aug 05 08:21:24 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: vnd.c,v 1.257 2016/07/26 01:49:48 pgoyette Exp $       */
+/*     $NetBSD: vnd.c,v 1.258 2016/08/05 08:21:24 pgoyette Exp $       */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.257 2016/07/26 01:49:48 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vnd.c,v 1.258 2016/08/05 08:21:24 pgoyette Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_vnd.h"
@@ -2106,7 +2106,7 @@
                  */
                error = config_cfattach_detach(vnd_cd.cd_name, &vnd_ca);
                 if (error) { 
-                        error = devsw_attach("vnd", &vnd_bdevsw, &vnd_bmajor,
+                        (void)devsw_attach("vnd", &vnd_bdevsw, &vnd_bmajor,
                             &vnd_cdevsw, &vnd_cmajor);
                         aprint_error("%s: failed to detach %s cfattach, "
                             "error %d\n", __func__, vnd_cd.cd_name, error);
@@ -2114,8 +2114,8 @@
                 }
                 error = config_cfdriver_detach(&vnd_cd);
                 if (error) {
-                        config_cfattach_attach(vnd_cd.cd_name, &vnd_ca); 
-                        devsw_attach("vnd", &vnd_bdevsw, &vnd_bmajor,
+                        (void)config_cfattach_attach(vnd_cd.cd_name, &vnd_ca); 
+                        (void)devsw_attach("vnd", &vnd_bdevsw, &vnd_bmajor,
                             &vnd_cdevsw, &vnd_cmajor);
                         aprint_error("%s: failed to detach %s cfdriver, "
                             "error %d\n", __func__, vnd_cd.cd_name, error);



Home | Main Index | Thread Index | Old Index