Name

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

Synopsis

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.