There are two return paths which don't kfree(name).
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
region_name = "ZM";
break;
default:
- return -EINVAL;
+ ret = -EINVAL;
+ goto err_name;
}
snprintf(name, PAGE_SIZE, "DSP%d %s %x",
if (!strcmp(ctl->name, name)) {
if (!ctl->enabled)
ctl->enabled = 1;
- return 0;
+ goto found;
}
}
INIT_WORK(&ctl_work->work, wm_adsp_ctl_work);
schedule_work(&ctl_work->work);
+found:
kfree(name);
return 0;