---
name: "remove_resource"
section: "9"
platform: "linux"
package: "linux-manual-4.9"
version: "4.9.228-1"
release: "Debian 9 (Stretch)"
platforms: ["linux"]
url: "https://new.carta.tech/remove_resource"
---

# remove\_resource(9)

Remove a resource in the resource tree

## NAME

remove\_resource - Remove a resource in the resource tree

## SYNOPSIS

**int remove\_resource(struct resource \*** *old***);**

## ARGUMENTS

*old*

resource to remove

## DESCRIPTION

Returns 0 on success, -EINVAL if the resource is not valid.

This function removes a resource previously inserted by **insert\_resource** or **insert\_resource\_conflict**, and moves the children (if any) up to where they were before. **insert\_resource** and **insert\_resource\_conflict** insert a new resource, and move any conflicting resources down to the children of the new resource.

**insert\_resource**, **insert\_resource\_conflict** and **remove\_resource** are intended for producers of resources, such as FW modules and bus drivers.

## COPYRIGHT
