]> Pileus Git - ~andy/linux/blobdiff - drivers/infiniband/core/mad.c
IB/mad: Fix RMPP version check during agent registration
[~andy/linux] / drivers / infiniband / core / mad.c
index 3a702da83e41bc595263aa29438fadc0ed3df3d3..469b6923a2e2e0a2c59b388d8f93fedc2e961fac 100644 (file)
@@ -228,10 +228,7 @@ struct ib_mad_agent *ib_register_mad_agent(struct ib_device *device,
                                goto error1;
                }
                /* Make sure class supplied is consistent with RMPP */
-               if (ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) {
-                       if (!rmpp_version)
-                               goto error1;
-               } else {
+               if (!ib_is_mad_class_rmpp(mad_reg_req->mgmt_class)) {
                        if (rmpp_version)
                                goto error1;
                }