devm_kstrdup(9)

devm_kstrdup9

Allocate resource managed space and copy an existing string into that.

Usage

char * devm_kstrdup(struct device * dev, const char * s, gfp_t gfp);

Arguments

dev

Device to allocate memory for

s

the string to duplicate

gfp

the GFP mask used in the devm_kmalloc call when allocating memory

Returns

Pointer to allocated string on success, NULL on failure.

From linux-manual-3.16 3.16.56-1+deb8u1 in Debian 8 (Jessie). Parsed by carta from the page's man source.