summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hardware.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hardware.c b/hardware.c
index 04154489..3a23b1f6 100644
--- a/hardware.c
+++ b/hardware.c
@@ -151,7 +151,7 @@ int hw_get_module(const char *id, const struct hw_module_t **module)
}
status = -ENOENT;
- if (i < HAL_VARIANT_KEYS_COUNT) {
+ if (i < HAL_VARIANT_KEYS_COUNT+1) {
/* load the module, if this fails, we're doomed, and we should not try
* to load a different variant. */
status = load(id, path, module);