diff options
author | Devendra Naga <develkernel412222@gmail.com> | 2012-07-21 10:37:58 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-08-05 00:24:15 +0200 |
commit | 0e3ac20d9f9872cbf2d00d6a63f92759cb8dd082 (patch) | |
tree | edc7f8e314a3fbb95ab6d85b4b99d47ff11ac790 /drivers/pinctrl/pinctrl-u300.c | |
parent | pinctrl: mxs: register driver at postcore_initcall time (diff) | |
download | linux-0e3ac20d9f9872cbf2d00d6a63f92759cb8dd082.tar.xz linux-0e3ac20d9f9872cbf2d00d6a63f92759cb8dd082.zip |
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: Devendra Naga <develkernel412222@gmail.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-u300.c')
-rw-r--r-- | drivers/pinctrl/pinctrl-u300.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/pinctrl/pinctrl-u300.c b/drivers/pinctrl/pinctrl-u300.c index a7ad8c112d91..309f5b9a70ec 100644 --- a/drivers/pinctrl/pinctrl-u300.c +++ b/drivers/pinctrl/pinctrl-u300.c @@ -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; } |