Commit 9ff5006a authored by Miaoqian Lin's avatar Miaoqian Lin Committed by Zheng Zengkai
Browse files

lib82596: Fix IRQ check in sni_82596_probe

stable inclusion
from stable-v5.10.94
commit 33bb7f027b069530110ec533829e65f22db8c8ff
bugzilla: https://gitee.com/openeuler/kernel/issues/I531X9

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=33bb7f027b069530110ec533829e65f22db8c8ff



--------------------------------

commit 99218cbf upstream.

platform_get_irq() returns negative error number instead 0 on failure.
And the doc of platform_get_irq() provides a usage example:

    int irq = platform_get_irq(pdev, 0);
    if (irq < 0)
        return irq;

Fix the check of return value to catch errors correctly.

Fixes: 11597885 ("i825xx: Move the Intel 82586/82593/82596 based drivers")
Signed-off-by: default avatarMiaoqian Lin <linmq006@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
Acked-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parent f24b0803
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment