Skip to content

Commit 733d4bb

Browse files
rleondavem330
authored andcommitted
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: 8979f42 ("net: liquidio: release resources when liquidio driver open failed") Reported-by: kernel test robot <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Reviewed-by: Saeed Mahameed <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 11b64a4 commit 733d4bb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/ethernet/cavium/liquidio/lio_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1794,7 +1794,7 @@ static int liquidio_open(struct net_device *netdev)
17941794

17951795
ifstate_set(lio, LIO_IFSTATE_RUNNING);
17961796

1797-
if (!OCTEON_CN23XX_PF(oct) || (OCTEON_CN23XX_PF(oct) && !oct->msix_on)) {
1797+
if (!OCTEON_CN23XX_PF(oct) || !oct->msix_on) {
17981798
ret = setup_tx_poll_fn(netdev);
17991799
if (ret)
18001800
goto err_poll;
@@ -1824,7 +1824,7 @@ static int liquidio_open(struct net_device *netdev)
18241824
return 0;
18251825

18261826
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)
18281828
cleanup_tx_poll_fn(netdev);
18291829
err_poll:
18301830
if (lio->ptp_clock) {

0 commit comments

Comments
 (0)