Skip to content

Commit cd5d581

Browse files
Wei Yongjunralfbaechle
authored andcommitted
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: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Acked-by: John Crispin <blogic@openwrt.org> Cc: grant.likely@linaro.org Cc: rob.herring@calxeda.com Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/6098/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 13b7ea6 commit cd5d581

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎arch/mips/ralink/timer.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ static int rt_timer_probe(struct platform_device *pdev)
126126
return -ENOENT;
127127
}
128128

129-
rt->membase = devm_request_and_ioremap(&pdev->dev, res);
129+
rt->membase = devm_ioremap_resource(&pdev->dev, res);
130130
if (IS_ERR(rt->membase))
131131
return PTR_ERR(rt->membase);
132132

0 commit comments

Comments
 (0)