Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e71a328 authored by Lina Iyer's avatar Lina Iyer
Browse files

of: irq: fix return when no match found in irqdomain map



Return an error value (currently returning 0) when a match for an
interrupt in the irqdomain map is not found.

Change-Id: I618fd5d6bf0ecbd84cdda74f469514ca7bc55667
Fixes: 0303182e ("of: irq: add helper to remap interrupts to another irqdomain")
Signed-off-by: default avatarLina Iyer <ilina@codeaurora.org>
parent a0ea5cbb
Loading
Loading
Loading
Loading
+26 −22
Original line number Diff line number Diff line
@@ -361,7 +361,12 @@ int of_irq_domain_map(const struct irq_fwspec *in, struct irq_fwspec *out)
		map += out_size;
		map_len -= out_size;
	}
	if (match) {

	if (!match) {
		ret = -EINVAL;
		goto put;
	}

	/* Get the irqdomain-map-pass-thru property (optional) */
	pass = of_get_property(cur, pass_name, NULL);
	if (!pass)
@@ -386,7 +391,6 @@ int of_irq_domain_map(const struct irq_fwspec *in, struct irq_fwspec *out)
	}
	out->param_count = in_size = out_size;
	out->fwnode = of_node_to_fwnode(new);
	}
put:
	of_node_put(cur);
	of_node_put(new);