[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1423055837.31210.29.camel@mtksdaap41>
Date: Wed, 4 Feb 2015 21:17:17 +0800
From: Yingjoe Chen <yingjoe.chen@...iatek.com>
To: Dan Carpenter <dan.carpenter@...cle.com>
CC: Thomas Gleixner <tglx@...utronix.de>,
Jason Cooper <jason@...edaemon.net>,
Matthias Brugger <matthias.bgg@...il.com>,
<linux-kernel@...r.kernel.org>,
<linux-arm-kernel@...ts.infradead.org>,
<kernel-janitors@...r.kernel.org>,
Eddie Huang <eddie.huang@...iatek.com>
Subject: Re: [patch] irqchip: mtk-sysirq: fix an error code
On Fri, 2015-01-30 at 11:28 +0300, Dan Carpenter wrote:
> "chip_data->intpol_base" used to be an ERR_PTR() but we recently changed
> it to be NULL. We need to update the error code as well because
> "PTR_ERR(NULL)" means success where really we want to return -ENOMEM.
>
> Fixes: cdb647a772e9 ('irqchip: mtk-sysirq: Get irq number from register resource size')
> Signed-off-by: Dan Carpenter <dan.carpenter@...cle.com>
>
> diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
> index eaf0a71..22eb34c 100644
> --- a/drivers/irqchip/irq-mtk-sysirq.c
> +++ b/drivers/irqchip/irq-mtk-sysirq.c
> @@ -144,7 +144,7 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
> chip_data->intpol_base = ioremap(res.start, size);
> if (!chip_data->intpol_base) {
> pr_err("mtk_sysirq: unable to map sysirq register\n");
> - ret = PTR_ERR(chip_data->intpol_base);
> + ret = -ENOMEM;
> goto out_free;
> }
>
Dan,
Thanks for catching this.
Acked-by: Yingjoe Chen <yingjoe.chen@...iatek.com>
I changed to use ioremap(), and remember to change the null pointer
check but not the return type. Sorry for the mistake.
Joe.C
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists