This kfree() was accidentally left over when we converted to devm_
and it would lead to a double free. Delete it.
Fixes:
995bc9f4826e ("pinctrl: keembay: release allocated memory in detach path")
Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
Reviewed-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
new_funcs = devm_krealloc_array(kpc->dev, keembay_funcs,
kpc->nfuncs, sizeof(*new_funcs),
GFP_KERNEL);
- if (!new_funcs) {
- kfree(keembay_funcs);
+ if (!new_funcs)
return -ENOMEM;
- }
return keembay_add_functions(kpc, new_funcs);
}