diff options
author | Wei Yongjun <yongjun_wei@trendmicro.com.cn> | 2014-08-26 06:17:36 -0400 |
---|---|---|
committer | Benjamin Gaignard <benjamin.gaignard@linaro.org> | 2014-08-26 08:16:32 -0400 |
commit | 31f32a21aa7e31179406f82b5fb3195b83d7acc8 (patch) | |
tree | 2cc36b87ca72b87656b085a6ba64af4040f8910c | |
parent | 7963e9db1b1f842fdc53309baa8714d38e9f5681 (diff) |
drm: sti: tvout: fix return value check in sti_tvout_probe()
In case of error, the function devm_ioremap_nocache() returns NULL
pointer not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
-rw-r--r-- | drivers/gpu/drm/sti/sti_tvout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/sti/sti_tvout.c b/drivers/gpu/drm/sti/sti_tvout.c index b69e26fee76e..9ad2d44d496f 100644 --- a/drivers/gpu/drm/sti/sti_tvout.c +++ b/drivers/gpu/drm/sti/sti_tvout.c | |||
@@ -591,8 +591,8 @@ static int sti_tvout_probe(struct platform_device *pdev) | |||
591 | return -ENOMEM; | 591 | return -ENOMEM; |
592 | } | 592 | } |
593 | tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); | 593 | tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); |
594 | if (IS_ERR(tvout->regs)) | 594 | if (!tvout->regs) |
595 | return PTR_ERR(tvout->regs); | 595 | return -ENOMEM; |
596 | 596 | ||
597 | /* get reset resources */ | 597 | /* get reset resources */ |
598 | tvout->reset = devm_reset_control_get(dev, "tvout"); | 598 | tvout->reset = devm_reset_control_get(dev, "tvout"); |