devm_kzalloc
Prev | Device Resource Management | Next

## Name

devm_kzalloc — Resource-managed kzalloc

## Synopsis

`void * devm_kzalloc (` | struct device * | dev,
| size_t | size,
| gfp_t | gfp`)`;

## Arguments

`dev`

  Device to allocate memory for

`size`

  Allocation size

`gfp`

  Allocation gfp flags

## Description

Managed kzalloc. Memory allocated with this function is automatically freed on driver detach. Like all other devres resources, guaranteed alignment is unsigned long long.

## RETURNS

Pointer to allocated memory on success, NULL on failure.

Prev | Up | Next
devres_release_group | Home | devm_kfree