提交 85316eae 编写于 作者: W Wei Yongjun 提交者: Thierry Reding

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: NWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: NThierry Reding <treding@nvidia.com>
上级 dec72739
...@@ -886,8 +886,8 @@ static int tegra_dsi_probe(struct platform_device *pdev) ...@@ -886,8 +886,8 @@ static int tegra_dsi_probe(struct platform_device *pdev)
regs = platform_get_resource(pdev, IORESOURCE_MEM, 0); regs = platform_get_resource(pdev, IORESOURCE_MEM, 0);
dsi->regs = devm_ioremap_resource(&pdev->dev, regs); dsi->regs = devm_ioremap_resource(&pdev->dev, regs);
if (!dsi->regs) if (IS_ERR(dsi->regs))
return -EADDRNOTAVAIL; return PTR_ERR(dsi->regs);
tegra_dsi_initialize(dsi); tegra_dsi_initialize(dsi);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册