]> git.baikalelectronics.ru Git - kernel.git/commit
peci: aspeed: fix error check return value of platform_get_irq()
authorLv Ruyi <lv.ruyi@zte.com.cn>
Wed, 13 Apr 2022 01:04:25 +0000 (01:04 +0000)
committerIwona Winiarska <iwona.winiarska@intel.com>
Mon, 15 Aug 2022 18:31:34 +0000 (20:31 +0200)
commite931df94800be0ab114ba46855f4d59ae79be968
treec157d7f73b77e711fc080d142780b53942d94a3c
parent34a3249ab33a1690f58cd6e91a0208887337d3e0
peci: aspeed: fix error check return value of platform_get_irq()

platform_get_irq() return negative value on failure, so null check of
priv->irq is incorrect. Fix it by comparing whether it is less than zero.

Fixes: 378e3e28e7ab ("peci: Add peci-aspeed controller driver")
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Lv Ruyi <lv.ruyi@zte.com.cn>
Link: https://lore.kernel.org/r/20220413010425.2534887-1-lv.ruyi@zte.com.cn
Reviewed-by: Iwona Winiarska <iwona.winiarska@intel.com>
Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
drivers/peci/controller/peci-aspeed.c