diff options
| author | Dan Carpenter <dan.carpenter@oracle.com> | 2016-05-26 02:45:42 -0400 |
|---|---|---|
| committer | MyungJoo Ham <myungjoo.ham@samsung.com> | 2016-06-22 00:52:55 -0400 |
| commit | 674789dd2c4b53ed368dc81ae22d72ac4fdb92ec (patch) | |
| tree | 85a614f26acb314ff5325fb0f9b4ea10f954a86a /drivers/devfreq | |
| parent | 67ffdb529b4ec9833f73947dec01eaa78dd53c3d (diff) | |
PM / devfreq: exynos-nocp: Remove incorrect IS_ERR() check
Smatch complains because platform_get_resource() returns NULL on error
and not an error pointer so the check is wrong. Julia Lawall pointed
out that normally we don't check these, because devm_ioremap_resource()
has a check for NULL.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Julia Lawall <julia.lawall@lip6.fr>
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Diffstat (limited to 'drivers/devfreq')
| -rw-r--r-- | drivers/devfreq/event/exynos-nocp.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/devfreq/event/exynos-nocp.c b/drivers/devfreq/event/exynos-nocp.c index 6b6a5f310486..a5841403bde8 100644 --- a/drivers/devfreq/event/exynos-nocp.c +++ b/drivers/devfreq/event/exynos-nocp.c | |||
| @@ -220,9 +220,6 @@ static int exynos_nocp_parse_dt(struct platform_device *pdev, | |||
| 220 | 220 | ||
| 221 | /* Maps the memory mapped IO to control nocp register */ | 221 | /* Maps the memory mapped IO to control nocp register */ |
| 222 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 222 | res = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
| 223 | if (IS_ERR(res)) | ||
| 224 | return PTR_ERR(res); | ||
| 225 | |||
| 226 | base = devm_ioremap_resource(dev, res); | 223 | base = devm_ioremap_resource(dev, res); |
| 227 | if (IS_ERR(base)) | 224 | if (IS_ERR(base)) |
| 228 | return PTR_ERR(base); | 225 | return PTR_ERR(base); |
