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: a85e4c52 ("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.cnReviewed-by: Iwona Winiarska <iwona.winiarska@intel.com> Signed-off-by: Iwona Winiarska <iwona.winiarska@intel.com>
Showing
Please register or sign in to comment