]> git.baikalelectronics.ru Git - kernel.git/commit
of/irq: Fix of_irq_parse_one() returned error codes
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Tue, 17 Mar 2015 22:21:32 +0000 (00:21 +0200)
committerRob Herring <robh@kernel.org>
Thu, 19 Mar 2015 13:39:14 +0000 (08:39 -0500)
commit2c230c55d348c6a769440f8feeb3ec7b55c1f79c
tree0812a0b0d5c1445fb09ef1c5e73654f388d7541c
parent4e813428b23f3210ec3696d8097c405444662f99
of/irq: Fix of_irq_parse_one() returned error codes

The error code paths that require cleanup use a goto to jump to the
cleanup code and return an error code. However, the error code variable
res, which is initialized to -EINVAL when declared, is then overwritten
with the return value of of_parse_phandle_with_args(), and reused as the
return code from of_irq_parse_one(). This leads to an undetermined error
being returned instead of the expected -EINVAL value. Fix it.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Cc: stable@vger.kernel.org # 3.13+
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/irq.c