diff options
author | Devendra Naga <develkernel412222@gmail.com> | 2012-07-21 04:37:58 -0400 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2012-08-04 18:24:15 -0400 |
commit | 0e3ac20d9f9872cbf2d00d6a63f92759cb8dd082 (patch) | |
tree | edc7f8e314a3fbb95ab6d85b4b99d47ff11ac790 /drivers/pinctrl | |
parent | c43ba8008252d26e023f3943bb83a48641b3dec4 (diff) |
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')
-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 a7ad8c112d9..309f5b9a70e 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) | |||
1121 | upmx->dev = &pdev->dev; | 1121 | upmx->dev = &pdev->dev; |
1122 | 1122 | ||
1123 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 1123 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
1124 | if (!res) { | 1124 | if (!res) |
1125 | ret = -ENOENT; | 1125 | return -ENOENT; |
1126 | goto out_no_resource; | ||
1127 | } | ||
1128 | upmx->phybase = res->start; | 1126 | upmx->phybase = res->start; |
1129 | upmx->physize = resource_size(res); | 1127 | upmx->physize = resource_size(res); |
1130 | 1128 | ||
@@ -1165,8 +1163,6 @@ out_no_remap: | |||
1165 | platform_set_drvdata(pdev, NULL); | 1163 | platform_set_drvdata(pdev, NULL); |
1166 | out_no_memregion: | 1164 | out_no_memregion: |
1167 | release_mem_region(upmx->phybase, upmx->physize); | 1165 | release_mem_region(upmx->phybase, upmx->physize); |
1168 | out_no_resource: | ||
1169 | devm_kfree(&pdev->dev, upmx); | ||
1170 | return ret; | 1166 | return ret; |
1171 | } | 1167 | } |
1172 | 1168 | ||