if (rproc->index >= 0)
ida_simple_remove(&rproc_dev_index, rproc->index);
- kfree(rproc->firmware);
+ kfree_const(rproc->firmware);
kfree(rproc->ops);
kfree(rproc);
}
static int rproc_alloc_firmware(struct rproc *rproc,
const char *name, const char *firmware)
{
- char *p;
+ const char *p;
if (!firmware)
/*
*/
p = kasprintf(GFP_KERNEL, "rproc-%s-fw", name);
else
- p = kstrdup(firmware, GFP_KERNEL);
+ p = kstrdup_const(firmware, GFP_KERNEL);
if (!p)
return -ENOMEM;
return rproc;
free_firmware:
- kfree(rproc->firmware);
+ kfree_const(rproc->firmware);
free_rproc:
kfree(rproc);
return NULL;