2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-27 22:53:55 +08:00

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>
This commit is contained in:
Wei Yongjun 2013-10-21 11:34:07 +08:00 committed by Thierry Reding
parent dec727399a
commit 85316eae48

View File

@ -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);