diff options
Diffstat (limited to 'arch/mips/lantiq/xway')
-rw-r--r-- | arch/mips/lantiq/xway/gptu.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/arch/mips/lantiq/xway/gptu.c b/arch/mips/lantiq/xway/gptu.c index 9861c8669fab..850821df924c 100644 --- a/arch/mips/lantiq/xway/gptu.c +++ b/arch/mips/lantiq/xway/gptu.c | |||
@@ -144,10 +144,6 @@ static int gptu_probe(struct platform_device *pdev) | |||
144 | } | 144 | } |
145 | 145 | ||
146 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 146 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
147 | if (!res) { | ||
148 | dev_err(&pdev->dev, "Failed to get resource\n"); | ||
149 | return -ENOMEM; | ||
150 | } | ||
151 | 147 | ||
152 | /* remap gptu register range */ | 148 | /* remap gptu register range */ |
153 | gptu_membase = devm_ioremap_resource(&pdev->dev, res); | 149 | gptu_membase = devm_ioremap_resource(&pdev->dev, res); |
@@ -169,6 +165,8 @@ static int gptu_probe(struct platform_device *pdev) | |||
169 | if (((gptu_r32(GPTU_ID) >> 8) & 0xff) != GPTU_MAGIC) { | 165 | if (((gptu_r32(GPTU_ID) >> 8) & 0xff) != GPTU_MAGIC) { |
170 | dev_err(&pdev->dev, "Failed to find magic\n"); | 166 | dev_err(&pdev->dev, "Failed to find magic\n"); |
171 | gptu_hwexit(); | 167 | gptu_hwexit(); |
168 | clk_disable(clk); | ||
169 | clk_put(clk); | ||
172 | return -ENAVAIL; | 170 | return -ENAVAIL; |
173 | } | 171 | } |
174 | 172 | ||