Since rman freed the resource, it is no longer available so don't call to bus_generic_release_resource()
The alloc_resource path instead does:
if (rm == NULL) return (BUS_ALLOC_RESOURCE(device_get_parent(dev), child, type, rid, start, end, count, flags));
perhaps the same should be done here, i.e. inverting the condition?
The current code is also a bit inconsistent between using BUS_FOO and bus_generic_foo, though they're equivalent (unless there is no parent, in which case bus_generic_foo will gracefully return EINVAL rather than faulting on a NULL dereference).