summaryrefslogtreecommitdiff
path: root/sys/modules/lua
diff options
context:
space:
mode:
authormaya <maya@NetBSD.org>2017-01-20 12:25:07 +0000
committermaya <maya@NetBSD.org>2017-01-20 12:25:07 +0000
commit85e09bc412b29793fc70dfdaf584fbf205f27a8b (patch)
tree3c0465de6d963e2b07f863e61da09c4eaa7f58e2 /sys/modules/lua
parent7b70ea82202f488e212768863d3d104a9a8e6733 (diff)
Check pmf_device_register return value. NFC
Appeases static analyzers.
Diffstat (limited to 'sys/modules/lua')
-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,