From: Mike Marciniszyn Date: Wed, 12 Sep 2012 13:01:29 +0000 (+0000) Subject: IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum X-Git-Tag: firefly_0821_release~3680^2~2075^2^5 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=4c3550057b83bde3250b2f105c7f56326fb43044;p=firefly-linux-kernel-4.4.55.git IB/qib: Fix failure of compliance test C14-024#06_LocalPortNum Commit 3236b2d469db ("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: Dean Luick Signed-off-by: Mike Marciniszyn Signed-off-by: Roland Dreier --- diff --git a/drivers/infiniband/hw/qib/qib_mad.c b/drivers/infiniband/hw/qib/qib_mad.c index 19f1e6c45fb6..ccb119143d20 100644 --- a/drivers/infiniband/hw/qib/qib_mad.c +++ b/drivers/infiniband/hw/qib/qib_mad.c @@ -471,9 +471,10 @@ 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; + } } }