Skip to content

Commit 400d033

Browse files
uudiindlezcano
authored andcommitted
clocksource/drivers/h8300_timer8: Fix wrong return value in h8300_8timer_init()
In the init function, if the call to of_iomap() fails, the return value is ENXIO instead of -ENXIO. Change to the right negative errno. Fixes: 691f8f8 ("clocksource/drivers/h8300_timer8: Convert init function to return error") Cc: Daniel Lezcano <[email protected]> Signed-off-by: Tianjia Zhang <[email protected]> Signed-off-by: Daniel Lezcano <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent b0294f3 commit 400d033

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/clocksource/h8300_timer8.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ static int __init h8300_8timer_init(struct device_node *node)
169169
return PTR_ERR(clk);
170170
}
171171

172-
ret = ENXIO;
172+
ret = -ENXIO;
173173
base = of_iomap(node, 0);
174174
if (!base) {
175175
pr_err("failed to map registers for clockevent\n");

0 commit comments

Comments
 (0)