Input: sun4i-ps2 - fix handling of platform_get_irq() error
authorKrzysztof Kozlowski <krzk@kernel.org>
Wed, 16 Sep 2020 00:56:40 +0000 (17:56 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 08:05:40 +0000 (09:05 +0100)
commita7a63e557d5ffa2939a17732f2a6e85cf7d741f5
treee33fa260c062ab4f843c79768df254360115be57
parenteacec05c1ccf58639cab016d8caa8d835100f57d
Input: sun4i-ps2 - fix handling of platform_get_irq() error

[ Upstream commit cafb3abea6136e59ea534004e5773361e196bb94 ]

platform_get_irq() returns -ERRNO on error.  In such case comparison
to 0 would pass the check.

Fixes: e443631d20f5 ("Input: serio - add support for Alwinner A10/A20 PS/2 controller")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Acked-by: Chen-Yu Tsai <wens@csie.org>
Link: https://lore.kernel.org/r/20200828145744.3636-4-krzk@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/input/serio/sun4i-ps2.c