Skip to contentSkip to conversation

of: irq: Fix the return value for of_irq_parse_one() stub

PATCH In review Saravana Kannan 2 participants 2 messages Feb 10, 2021 Device tree

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 of: irq: Fix the return value for of_irq_parse_one() stub

When commit 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()") added a stub for of_irq_parse_one() it set the return value to 0. Return value of 0 in this instance means the call succeeded and the out_irq pointer was filled with valid data. So, fix it to return an error value.

Fixes 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")

---

This needs to go into driver-core.

-Saravana

 include/linux/of_irq.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/of_irq.h +1 -1
index f898d838d201..aaf219bd0354 100644
@@ -60,7 +60,7 @@ u32 of_msi_map_id(struct device *dev, struct device_node *msi_np, u32 id_in);
 static inline int of_irq_parse_one(struct device_node *device, int index,
 				   struct of_phandle_args *out_irq)
 {
-	return 0;
+	return -EINVAL;
 }
 static inline int of_irq_count(struct device_node *dev)
 {
Signature · 1 line
2.30.0.478.g8a0d178c01-goog
Acked-by on v1 1/1
#1 lore raw

Hi Saravana,

Quoted 8 lines · On Wed, 10 Feb 2021 12:00:49 -0800 Saravana Kannan <[email protected]> wrote:

When commit 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()") added a stub for of_irq_parse_one() it set the return value to 0. Return value of 0 in this instance means the call succeeded and the out_irq pointer was filled with valid data. So, fix it to return an error value.

Fixes 1852ebd13542 ("of: irq: make a stub for of_irq_parse_one()")

Oops, sorry about that.

Signature · 2 lines
Cheers,
Stephen Rothwell