Commit 31f32a21 authored by Wei Yongjun's avatar Wei Yongjun Committed by Benjamin Gaignard

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: default avatarWei Yongjun <yongjun_wei@trendmicro.com.cn>
parent 7963e9db
...@@ -591,8 +591,8 @@ static int sti_tvout_probe(struct platform_device *pdev) ...@@ -591,8 +591,8 @@ static int sti_tvout_probe(struct platform_device *pdev)
return -ENOMEM; return -ENOMEM;
} }
tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res)); tvout->regs = devm_ioremap_nocache(dev, res->start, resource_size(res));
if (IS_ERR(tvout->regs)) if (!tvout->regs)
return PTR_ERR(tvout->regs); return -ENOMEM;
/* get reset resources */ /* get reset resources */
tvout->reset = devm_reset_control_get(dev, "tvout"); tvout->reset = devm_reset_control_get(dev, "tvout");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment