summaryrefslogtreecommitdiff
path: root/sys/modules/lua/lua.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/modules/lua/lua.c')
-rw-r--r--sys/modules/lua/lua.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/modules/lua/lua.c b/sys/modules/lua/lua.c
index 7ac86ad263b..7d574f5df13 100644
--- a/sys/modules/lua/lua.c
+++ b/sys/modules/lua/lua.c
@@ -1,4 +1,4 @@
-/* $NetBSD: lua.c,v 1.18 2016/07/14 04:00:46 msaitoh Exp $ */
+/* $NetBSD: lua.c,v 1.19 2017/01/20 12:25:07 maya Exp $ */
/*
* Copyright (c) 2014 by Lourival Vieira Neto <lneto@NetBSD.org>.
@@ -141,7 +141,8 @@ lua_attach(device_t parent, device_t self, void *aux)
mutex_init(&sc->sc_state_lock, MUTEX_DEFAULT, IPL_VM);
cv_init(&sc->sc_state_cv, "luastate");
- pmf_device_register(self, NULL, NULL);
+ if (!pmf_device_register(self, NULL, NULL))
+ aprint_error_dev(self, "couldn't establish power handler\n");
/* Sysctl to provide some control over behaviour */
sysctl_createv(&sc->sc_log, 0, NULL, &node,