Commit 733d4bbf authored by Leon Romanovsky's avatar Leon Romanovsky Committed by David S. Miller

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: 8979f428 ("net: liquidio: release resources when liquidio driver open failed")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarLeon Romanovsky <leonro@nvidia.com>
Reviewed-by: default avatarSaeed Mahameed <saeed@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 11b64a46
...@@ -1794,7 +1794,7 @@ static int liquidio_open(struct net_device *netdev) ...@@ -1794,7 +1794,7 @@ static int liquidio_open(struct net_device *netdev)
ifstate_set(lio, LIO_IFSTATE_RUNNING); ifstate_set(lio, LIO_IFSTATE_RUNNING);
if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) { if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) {
ret = setup_tx_poll_fn(netdev); ret = setup_tx_poll_fn(netdev);
if (ret) if (ret)
goto err_poll; goto err_poll;
...@@ -1824,7 +1824,7 @@ static int liquidio_open(struct net_device *netdev) ...@@ -1824,7 +1824,7 @@ static int liquidio_open(struct net_device *netdev)
return 0; return 0;
err_rx_ctrl: err_rx_ctrl:
if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on)
cleanup_tx_poll_fn(netdev); cleanup_tx_poll_fn(netdev);
err_poll: err_poll:
if (lio->ptp_clock) { if (lio->ptp_clock) {
......
Markdown is supported
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