ibcore: Don't allocate method table, if already present.
This commit aligns the code in question with upstream Linux. Linux commit: 2468b82d69e3a53d024f28d79ba0fdb8bf43dfbf MFC after: 1 week Reviewed by: kib Sponsored by: Mellanox Technologies // NVIDIA Networking
This commit is contained in:
parent
c6ccb08686
commit
721b795b72
@ -1554,8 +1554,11 @@ static int add_oui_reg_req(struct ib_mad_reg_req *mad_reg_req,
|
||||
method = &(*vendor_table)->vendor_class[
|
||||
vclass]->method_table[i];
|
||||
/* Allocate method table for this OUI */
|
||||
if ((ret = allocate_method_table(method)))
|
||||
if (!*method) {
|
||||
ret = allocate_method_table(method);
|
||||
if (ret)
|
||||
goto error3;
|
||||
}
|
||||
memcpy((*vendor_table)->vendor_class[vclass]->oui[i],
|
||||
mad_reg_req->oui, 3);
|
||||
goto check_in_use;
|
||||
|
Loading…
Reference in New Issue
Block a user