Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0e3ac20d authored by Devendra Naga's avatar Devendra Naga Committed by Linus Walleij
Browse files

pinctrl/pinctrl-u300: remove unneeded devm_kfree call



the allocated memory will be destroyed at the driver unload time,
automatically if driver uses the devm_ functions, so no need of
doing devm_kfree at the error path

Signed-off-by: default avatarDevendra Naga <develkernel412222@gmail.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent c43ba800
Loading
Loading
Loading
Loading
+2 −6
Original line number Diff line number Diff line
@@ -1121,10 +1121,8 @@ static int __devinit u300_pmx_probe(struct platform_device *pdev)
	upmx->dev = &pdev->dev;

	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
	if (!res) {
		ret = -ENOENT;
		goto out_no_resource;
	}
	if (!res)
		return -ENOENT;
	upmx->phybase = res->start;
	upmx->physize = resource_size(res);

@@ -1165,8 +1163,6 @@ out_no_remap:
	platform_set_drvdata(pdev, NULL);
out_no_memregion:
	release_mem_region(upmx->phybase, upmx->physize);
out_no_resource:
	devm_kfree(&pdev->dev, upmx);
	return ret;
}