Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: liquidio: simplify if expression

Fix the warning reported by kbuild:

cocci warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/cavium/liquidio/lio_main.c:1797:54-56: WARNING !A || A && B is equivalent to !A || B
drivers/net/ethernet/cavium/liquidio/lio_main.c:1827:54-56: WARNING !A || A && B is equivalent to !A || B

Fixes: 8979f428a4af ("net: liquidio: release resources when liquidio driver open failed")
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Reviewed-by: Saeed Mahameed <saeed@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Leon Romanovsky and committed by
David S. Miller
733d4bbf 11b64a46

+2 -2
+2 -2
drivers/net/ethernet/cavium/liquidio/lio_main.c
··· 1794 1794 1795 1795 ifstate_set(lio, LIO_IFSTATE_RUNNING); 1796 1796 1797 - if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) { 1797 + if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) { 1798 1798 ret = setup_tx_poll_fn(netdev); 1799 1799 if (ret) 1800 1800 goto err_poll; ··· 1824 1824 return 0; 1825 1825 1826 1826 err_rx_ctrl: 1827 - if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) 1827 + if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) 1828 1828 cleanup_tx_poll_fn(netdev); 1829 1829 err_poll: 1830 1830 if (lio->ptp_clock) {