Skip to content
Commit 971f5c40 authored by Nathan Chancellor's avatar Nathan Chancellor Committed by David S. Miller
Browse files

net: ax88796c: Remove pointless check in ax88796c_open()

Clang warns:

drivers/net/ethernet/asix/ax88796c_main.c:851:24: error: address of
array 'ax_local->phydev->advertising' will always evaluate to 'true'
[-Werror,-Wpointer-bool-conversion]
        if (ax_local->phydev->advertising &&
            ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~ ~~

advertising cannot be NULL here if ax_local is not NULL, which cannot
happen due to the check in ax88796c_probe(). Remove the check.

Link: https://github.com/ClangBuiltLinux/linux/issues/1492


Signed-off-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3c554881
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment