[Uclinux-h8-devel] [PATCH] clocksource: Return negative error code in h8300_8timer_init()

Zurück zum Archiv-Index
Tianxianting tian.****@h3c*****
2020年 9月 2日 (水) 17:34:50 JST


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:Marku****@web*****] 
Sent: Tuesday, September 01, 2020 10:46 PM
To: tianxianting (RD) <tian.****@h3c*****>; uclin****@lists*****
Cc: linux****@vger*****; kerne****@vger*****; Daniel Lezcano <danie****@linar*****>; Thomas Gleixner <tglx****@linut*****>; Yoshinori Sato <ysato****@users*****>
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


Uclinux-h8-devel メーリングリストの案内
Zurück zum Archiv-Index