summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2013-10-21 03:34:07 (GMT)
committerThierry Reding <treding@nvidia.com>2013-12-20 14:56:05 (GMT)
commit85316eae487fd7e1535860f3b1b2f9d3996d08db (patch)
tree5efcfa5cd09c0ff68e5ae4920ff02cc893ea1f01 /drivers
parentdec727399a4b36bec87b7b4d4c1b20025e69758a (diff)
downloadlinux-85316eae487fd7e1535860f3b1b2f9d3996d08db.tar.xz
drm/tegra: Fix return value check
In case of error, the devm_ioremap_resource() function returns ERR_PTR() and never NULL. The NULL test in the return value check should therefore be replaced with IS_ERR(). Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/tegra/dsi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tegra/dsi.c b/drivers/gpu/drm/tegra/dsi.c
index 84a73e3..844818f 100644
--- a/drivers/gpu/drm/tegra/dsi.c
+++ b/drivers/gpu/drm/tegra/dsi.c
@@ -886,8 +886,8 @@ static int tegra_dsi_probe(struct platform_device *pdev)
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dsi->regs = devm_ioremap_resource(&pdev->dev, regs);
- if (!dsi->regs)
- return -EADDRNOTAVAIL;
+ if (IS_ERR(dsi->regs))
+ return PTR_ERR(dsi->regs);
tegra_dsi_initialize(dsi);