Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 85316eae authored by Wei Yongjun's avatar Wei Yongjun Committed by Thierry Reding
Browse files

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
parent dec72739
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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);