]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
EDAC/ti: Fix handling of platform_get_irq() error
authorKrzysztof Kozlowski <krzk@kernel.org>
Thu, 27 Aug 2020 07:07:43 +0000 (09:07 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:07:14 +0000 (10:07 +0100)
commit3b172044dc5503186d05540c451b24efd2c8ea5b
tree665d2e1d32919d070a3eae6c3d9496fce8d9f62b
parent0d0f50ecd85d15e1c383eddaaa5bff528a2f4847
EDAC/ti: Fix handling of platform_get_irq() error

[ Upstream commit 66077adb70a2a9e92540155b2ace33ec98299c90 ]

platform_get_irq() returns a negative error number on error. In such a
case, comparison to 0 would pass the check therefore check the return
value properly, whether it is negative.

 [ bp: Massage commit message. ]

Fixes: 86a18ee21e5e ("EDAC, ti: Add support for TI keystone and DRA7xx EDAC")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Tero Kristo <t-kristo@ti.com>
Link: https://lkml.kernel.org/r/20200827070743.26628-2-krzk@kernel.org
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/edac/ti_edac.c