]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:54 +0000 (14:03 +0200)
commit874fee53430ab4fd92326832a99402d00e1f629c
treefa09e236c869536188327c186c463ad1570bf589
parentbae96235997e41843eeb118bfb12aa4365266ce2
of/irq: Fix of_irq_parse_one() returned error codes

commit d7c146053dd195b90c79b9b8131431f44541d015 upstream.

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>
Signed-off-by: Rob Herring <robh@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/of/irq.c