Commit 6e68c899 authored by Colin Ian King's avatar Colin Ian King Committed by Jason Gunthorpe
Browse files

IB/mthca: remove redundant inner check of mdev->mthca_flags



The inner check for mdev->mthca_flags & MTHCA_FLAG_MSI_X is redundant
as this is already true because of the previous identical check in
an outer if statement.  Remove it

Detected by cppcheck:
(warning) Identical inner 'if' condition is always true.

Signed-off-by: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarJason Gunthorpe <jgg@mellanox.com>
parent c7c28191
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -1014,7 +1014,6 @@ static int __mthca_init_one(struct pci_dev *pdev, int hca_type)

	err = mthca_setup_hca(mdev);
	if (err == -EBUSY && (mdev->mthca_flags & MTHCA_FLAG_MSI_X)) {
		if (mdev->mthca_flags & MTHCA_FLAG_MSI_X)
		pci_free_irq_vectors(pdev);
		mdev->mthca_flags &= ~MTHCA_FLAG_MSI_X;