EDAC/aspeed: Fix handling of platform_get_irq() error
authorKrzysztof Kozlowski <krzk@kernel.org>
Thu, 27 Aug 2020 07:07:42 +0000 (09:07 +0200)
committerBorislav Petkov <bp@suse.de>
Tue, 1 Sep 2020 18:41:27 +0000 (20:41 +0200)
commitafce6996943be265fa39240b67025cfcb1bcdfb1
treee83dd5b58a5ef96fe3062547e2da260fccfcfe81
parent857a3139bd8be4f702c030c8ca06f3fd69c1741a
EDAC/aspeed: Fix handling of platform_get_irq() error

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: 9b7e6242ee4e ("EDAC, aspeed: Add an Aspeed AST2500 EDAC driver")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Reviewed-by: Stefan Schaeckeler <schaecsn@gmx.net>
Link: https://lkml.kernel.org/r/20200827070743.26628-1-krzk@kernel.org
drivers/edac/aspeed_edac.c