phylink: require valid state argument to phylink_validate_mask_caps()
authorJakub Kicinski <kuba@kernel.org>
Tue, 25 Oct 2022 18:51:26 +0000 (11:51 -0700)
committerJakub Kicinski <kuba@kernel.org>
Thu, 27 Oct 2022 02:07:43 +0000 (19:07 -0700)
commite0b3ef17f45eb8a6860189306cf0ce5f509a043b
tree54931c0b1bfa303b7e6b9a56dcf9567f765698a5
parentd1e96cc4fbe031c19d6fd9d8d2e63c03452fa290
phylink: require valid state argument to phylink_validate_mask_caps()

state is deferenced earlier in the function, the NULL check
is pointless. Since we don't have any crash reports presumably
it's safe to assume state is not NULL.

Fixes: f392a1846489 ("net: phylink: provide phylink_validate_mask_caps() helper")
Reviewed-by: Sean Anderson <sean.anderson@seco.com>
Link: https://lore.kernel.org/r/20221025185126.1720553-1-kuba@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/phylink.c