Commit cd5d5810 authored by Wei Yongjun's avatar Wei Yongjun Committed by Ralf Baechle
Browse files

MIPS: ralink: fix return value check in rt_timer_probe()

In case of error, the function devm_request_and_ioremap() returns NULL
pointer not ERR_PTR(). Fix it by using devm_ioremap_resource() instead
of devm_request_and_ioremap().
Signed-off-by: default avatarWei Yongjun <>
Acked-by: default avatarJohn Crispin <>

Signed-off-by: default avatarRalf Baechle <>
parent 13b7ea63
......@@ -126,7 +126,7 @@ static int rt_timer_probe(struct platform_device *pdev)
return -ENOENT;
rt->membase = devm_request_and_ioremap(&pdev->dev, res);
rt->membase = devm_ioremap_resource(&pdev->dev, res);
if (IS_ERR(rt->membase))
return PTR_ERR(rt->membase);
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