maiblox: mediatek: Fix handling of platform_get_irq() error
authorKrzysztof Kozlowski <krzk@kernel.org>
Thu, 27 Aug 2020 07:31:28 +0000 (09:31 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 29 Oct 2020 09:08:02 +0000 (10:08 +0100)
commitc6a8b7714cd7e28f083b55d851a8439dda744c6c
tree3ece94332902804224e539cd433b8f814ce8c1d6
parent66f6ea1e0ed3a0e4bf28b2fc5b85d73aa11583f3
maiblox: mediatek: Fix handling of platform_get_irq() error

[ Upstream commit 558e4c36ec9f2722af4fe8ef84dc812bcdb5c43a ]

platform_get_irq() returns -ERRNO on error.  In such case casting to u32
and comparing to 0 would pass the check.

Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver")
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/mailbox/mtk-cmdq-mailbox.c