Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/sgimips/mace Check a return value of pmf_device_reg...
details: https://anonhg.NetBSD.org/src/rev/f9faf2183ae9
branches: trunk
changeset: 747079:f9faf2183ae9
user: tsutsui <tsutsui%NetBSD.org@localhost>
date: Tue Sep 01 17:10:42 2009 +0000
description:
Check a return value of pmf_device_register1(9) and also call
pmf_class_network_register(9).
diffstat:
sys/arch/sgimips/mace/if_mec.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diffs (30 lines):
diff -r 53e10008eb78 -r f9faf2183ae9 sys/arch/sgimips/mace/if_mec.c
--- a/sys/arch/sgimips/mace/if_mec.c Tue Sep 01 15:19:20 2009 +0000
+++ b/sys/arch/sgimips/mace/if_mec.c Tue Sep 01 17:10:42 2009 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_mec.c,v 1.36 2009/09/01 15:19:20 tsutsui Exp $ */
+/* $NetBSD: if_mec.c,v 1.37 2009/09/01 17:10:42 tsutsui Exp $ */
/*-
* Copyright (c) 2004, 2008 Izumi Tsutsui. All rights reserved.
@@ -61,7 +61,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.36 2009/09/01 15:19:20 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mec.c,v 1.37 2009/09/01 17:10:42 tsutsui Exp $");
#include "opt_ddb.h"
#include "bpfilter.h"
@@ -726,7 +726,10 @@
#endif
/* set shutdown hook to reset interface on powerdown */
- pmf_device_register1(self, NULL, NULL, mec_shutdown);
+ if (!pmf_device_register1(self, NULL, NULL, mec_shutdown))
+ aprint_error_dev(self, "couldn't establish power handler\n");
+ else
+ pmf_class_network_register(self, &sc->sc_ethercom.ec_if);
return;
Home |
Main Index |
Thread Index |
Old Index