---
name: "devres_alloc"
section: "9"
platform: "linux"
package: "linux-manual-3.16"
version: "3.16.56-1+deb8u1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/devres_alloc"
---

# devres\_alloc(9)

Allocate device resource data

## NAME

devres\_alloc - Allocate device resource data

## SYNOPSIS

**void \* devres\_alloc(dr\_release\_t** *release***, size\_t** *size***, gfp\_t** *gfp***);**

## ARGUMENTS

*release*

Release function devres will be associated with

*size*

Allocation size

*gfp*

Allocation flags

## DESCRIPTION

Allocate devres of *size* bytes. The allocated area is zeroed, then associated with *release*. The returned pointer can be passed to other devres\_\*() functions.

## RETURNS

Pointer to allocated devres on success, NULL on failure.

## COPYRIGHT
