diff options
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) | |||
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 | ||