From 1381f830a50af3f82a064e321a2a766edf5404b2 Mon Sep 17 00:00:00 2001 From: Andrew Turner Date: Mon, 27 Apr 2015 15:16:51 +0000 Subject: [PATCH] Return NULL on failure from nexus_alloc_resource as it reutrns a pointer. --- sys/arm64/arm64/nexus.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/arm64/arm64/nexus.c b/sys/arm64/arm64/nexus.c index 15b18b50383a..bc3833036a10 100644 --- a/sys/arm64/arm64/nexus.c +++ b/sys/arm64/arm64/nexus.c @@ -208,12 +208,12 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, break; default: - return (0); + return (NULL); } rv = rman_reserve_resource(rm, start, end, count, flags, child); if (rv == 0) - return (0); + return (NULL); rman_set_rid(rv, *rid); rman_set_bushandle(rv, rman_get_start(rv)); @@ -221,7 +221,7 @@ nexus_alloc_resource(device_t bus, device_t child, int type, int *rid, if (needactivate) { if (bus_activate_resource(child, type, *rid, rv)) { rman_release_resource(rv); - return (0); + return (NULL); } }