diff --git a/sys/riscv/riscv/nexus.c b/sys/riscv/riscv/nexus.c index a4ced760eea..75e16b881f1 100644 --- a/sys/riscv/riscv/nexus.c +++ b/sys/riscv/riscv/nexus.c @@ -242,7 +242,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, } rv = rman_reserve_resource(rm, start, end, count, flags, child); - if (rv == 0) + if (rv == NULL) return (NULL); rman_set_rid(rv, *rid);