net: ax88796c: Remove pointless check in ax88796c_open()
authorNathan Chancellor <nathan@kernel.org>
Mon, 25 Oct 2021 21:12:39 +0000 (14:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 26 Oct 2021 13:57:23 +0000 (14:57 +0100)
commit971f5c4079ed46a131ad3ac6e684ed056a7777da
tree688cb6512d893f81f1c0e9f8f8ce6e6c9114ff0b
parent3c5548812a0cf536b98f8d9f7f9377bd304809c1
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: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/asix/ax88796c_main.c