Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4c355005 authored by Mike Marciniszyn's avatar Mike Marciniszyn Committed by Roland Dreier
Browse files

IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum



Commit 3236b2d4 ("IB/qib: MADs with misset M_Keys should return
failure") introduced a return code assignment that unfortunately
introduced an unconditional exit for the routine due to missing braces.

This patch adds the braces to correct the original patch.

Reviewed-by: default avatarDean Luick <dean.luick@intel.com>
Signed-off-by: default avatarMike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: default avatarRoland Dreier <roland@purestorage.com>
parent fea7a08a
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -471,11 +471,12 @@ static int subn_get_portinfo(struct ib_smp *smp, struct ib_device *ibdev,
		if (port_num != port) {
			ibp = to_iport(ibdev, port_num);
			ret = check_mkey(ibp, smp, 0);
			if (ret)
			if (ret) {
				ret = IB_MAD_RESULT_FAILURE;
				goto bail;
			}
		}
	}

	dd = dd_from_ibdev(ibdev);
	/* IB numbers ports from 1, hdw from 0 */