linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
@ 2021-10-25  5:00 Yang Yingliang
  2021-10-25  7:44 ` Claudiu.Beznea
  2021-10-25  8:11 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang
  0 siblings, 2 replies; 5+ messages in thread
From: Yang Yingliang @ 2021-10-25  5:00 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel; +Cc: maz, claudiu.beznea

In case of error, the function of_iomap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
---
 drivers/irqchip/irq-mchp-eic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
index 09b7a8cdb611..c726a19837d2 100644
--- a/drivers/irqchip/irq-mchp-eic.c
+++ b/drivers/irqchip/irq-mchp-eic.c
@@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
 		return -ENOMEM;
 
 	eic->base = of_iomap(node, 0);
-	if (IS_ERR(eic->base)) {
+	if (!eic->base) {
 		ret = -ENOMEM;
 		goto free;
 	}
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
  2021-10-25  5:00 [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init() Yang Yingliang
@ 2021-10-25  7:44 ` Claudiu.Beznea
  2021-10-25  9:40   ` Claudiu.Beznea
  2021-10-25  8:11 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang
  1 sibling, 1 reply; 5+ messages in thread
From: Claudiu.Beznea @ 2021-10-25  7:44 UTC (permalink / raw)
  To: yangyingliang, linux-kernel, linux-arm-kernel; +Cc: maz

On 25.10.2021 08:00, Yang Yingliang wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> 
> In case of error, the function of_iomap() returns NULL pointer
> not ERR_PTR(). The IS_ERR() test in the return value check
> should be replaced with NULL test.
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Yang Yingliang <yangyingliang@huawei.
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Thank you!

> ---
>  drivers/irqchip/irq-mchp-eic.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
> index 09b7a8cdb611..c726a19837d2 100644
> --- a/drivers/irqchip/irq-mchp-eic.c
> +++ b/drivers/irqchip/irq-mchp-eic.c
> @@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
>                 return -ENOMEM;
> 
>         eic->base = of_iomap(node, 0);
> -       if (IS_ERR(eic->base)) {
> +       if (!eic->base) {
>                 ret = -ENOMEM;
>                 goto free;
>         }
> --
> 2.25.1
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [irqchip: irq/irqchip-next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
  2021-10-25  5:00 [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init() Yang Yingliang
  2021-10-25  7:44 ` Claudiu.Beznea
@ 2021-10-25  8:11 ` irqchip-bot for Yang Yingliang
  1 sibling, 0 replies; 5+ messages in thread
From: irqchip-bot for Yang Yingliang @ 2021-10-25  8:11 UTC (permalink / raw)
  To: linux-kernel
  Cc: Hulk Robot, Yang Yingliang, Claudiu Beznea, Marc Zyngier, tglx

The following commit has been merged into the irq/irqchip-next branch of irqchip:

Commit-ID:     68a6e0c63c76128d403e8ca016c0bcb732ff1b05
Gitweb:        https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/68a6e0c63c76128d403e8ca016c0bcb732ff1b05
Author:        Yang Yingliang <yangyingliang@huawei.com>
AuthorDate:    Mon, 25 Oct 2021 13:00:55 +08:00
Committer:     Marc Zyngier <maz@kernel.org>
CommitterDate: Mon, 25 Oct 2021 09:02:18 +01:00

irqchip/mchp-eic: Fix return value check in mchp_eic_init()

In case of error, the function of_iomap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211025050055.1129845-1-yangyingliang@huawei.com
---
 drivers/irqchip/irq-mchp-eic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
index 09b7a8c..c726a19 100644
--- a/drivers/irqchip/irq-mchp-eic.c
+++ b/drivers/irqchip/irq-mchp-eic.c
@@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
 		return -ENOMEM;
 
 	eic->base = of_iomap(node, 0);
-	if (IS_ERR(eic->base)) {
+	if (!eic->base) {
 		ret = -ENOMEM;
 		goto free;
 	}

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
  2021-10-25  7:44 ` Claudiu.Beznea
@ 2021-10-25  9:40   ` Claudiu.Beznea
  2021-10-25 10:30     ` Marc Zyngier
  0 siblings, 1 reply; 5+ messages in thread
From: Claudiu.Beznea @ 2021-10-25  9:40 UTC (permalink / raw)
  To: yangyingliang, linux-kernel, linux-arm-kernel; +Cc: maz

On 25.10.2021 10:44, Claudiu Beznea - M18063 wrote:
> On 25.10.2021 08:00, Yang Yingliang wrote:
>> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>>
>> In case of error, the function of_iomap() returns NULL pointer
>> not ERR_PTR(). The IS_ERR() test in the return value check
>> should be replaced with NULL test.
>>
>> Reported-by: Hulk Robot <hulkci@huawei.com>
>> Signed-off-by: Yang Yingliang <yangyingliang@huawei.
> Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>

Forgot to mention, can you add the Fixes tag?

> 
> Thank you!
> 
>> ---
>>  drivers/irqchip/irq-mchp-eic.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/irqchip/irq-mchp-eic.c b/drivers/irqchip/irq-mchp-eic.c
>> index 09b7a8cdb611..c726a19837d2 100644
>> --- a/drivers/irqchip/irq-mchp-eic.c
>> +++ b/drivers/irqchip/irq-mchp-eic.c
>> @@ -209,7 +209,7 @@ static int mchp_eic_init(struct device_node *node, struct device_node *parent)
>>                 return -ENOMEM;
>>
>>         eic->base = of_iomap(node, 0);
>> -       if (IS_ERR(eic->base)) {
>> +       if (!eic->base) {
>>                 ret = -ENOMEM;
>>                 goto free;
>>         }
>> --
>> 2.25.1
>>
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init()
  2021-10-25  9:40   ` Claudiu.Beznea
@ 2021-10-25 10:30     ` Marc Zyngier
  0 siblings, 0 replies; 5+ messages in thread
From: Marc Zyngier @ 2021-10-25 10:30 UTC (permalink / raw)
  To: Claudiu.Beznea; +Cc: yangyingliang, linux-kernel, linux-arm-kernel

On Mon, 25 Oct 2021 10:40:15 +0100,
<Claudiu.Beznea@microchip.com> wrote:
> 
> On 25.10.2021 10:44, Claudiu Beznea - M18063 wrote:
> > On 25.10.2021 08:00, Yang Yingliang wrote:
> >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
> >>
> >> In case of error, the function of_iomap() returns NULL pointer
> >> not ERR_PTR(). The IS_ERR() test in the return value check
> >> should be replaced with NULL test.
> >>
> >> Reported-by: Hulk Robot <hulkci@huawei.com>
> >> Signed-off-by: Yang Yingliang <yangyingliang@huawei.
> > Reviewed-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> 
> Forgot to mention, can you add the Fixes tag?

There is no real need for one when the offending patch is in the same
merge window, and will be in the same pull request.

	M.

-- 
Without deviation from the norm, progress is not possible.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-10-25 10:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25  5:00 [PATCH -next] irqchip/mchp-eic: Fix return value check in mchp_eic_init() Yang Yingliang
2021-10-25  7:44 ` Claudiu.Beznea
2021-10-25  9:40   ` Claudiu.Beznea
2021-10-25 10:30     ` Marc Zyngier
2021-10-25  8:11 ` [irqchip: irq/irqchip-next] " irqchip-bot for Yang Yingliang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).