RE: [PATCH] clocksource: Return negative error code in h8300_8timer_init()
From: Tianxianting
Date: Wed Sep 02 2020 - 06:05:35 EST
Hi Markus,
Thanks for your comments.
No real fix, as normally , we should return a negative code,
In function h8300_8timer_init(), it set ' ret = -EINVAL ', ' ret = ENXIO' , it should be align with a negative code
static int __init h8300_8timer_init(struct device_node *node)
{
ret = ENXIO; <<<
base = of_iomap(node, 0);
if (!base) {
pr_err("failed to map registers for clockevent\n");
goto free_clk;
}
ret = -EINVAL; <<<
irq = irq_of_parse_and_map(node, 0);
if (!irq) {
pr_err("failed to get irq for clockevent\n");
goto unmap_reg;
}
-----Original Message-----
From: Markus Elfring [mailto:Markus.Elfring@xxxxxx]
Sent: Tuesday, September 01, 2020 10:46 PM
To: tianxianting (RD) <tian.xianting@xxxxxxx>; uclinux-h8-devel@xxxxxxxxxxxxxxxxxxxx
Cc: linux-kernel@xxxxxxxxxxxxxxx; kernel-janitors@xxxxxxxxxxxxxxx; Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>; Thomas Gleixner <tglx@xxxxxxxxxxxxx>; Yoshinori Sato <ysato@xxxxxxxxxxxxxxxxxxxx>
Subject: Re: [PATCH] clocksource: Return negative error code in h8300_8timer_init()
> A negative error code should be returned
* Can an other imperative wording become helpful for the change description?
* Would you like to add the tag “Fixes” to the commit message?
Regards,
Markus