]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/infiniband/hw/mthca/mthca_mad.c
Merge tag 'libnvdimm-for-4.9' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm...
[linux-beck.git] / drivers / infiniband / hw / mthca / mthca_mad.c
index 7c3f2fb44ba51d8f288221df7b4d316a56adab28..9139405c481000af597416b6c26c80ad6bf0d732 100644 (file)
@@ -153,7 +153,8 @@ static void node_desc_override(struct ib_device *dev,
            mad->mad_hdr.method == IB_MGMT_METHOD_GET_RESP &&
            mad->mad_hdr.attr_id == IB_SMP_ATTR_NODE_DESC) {
                mutex_lock(&to_mdev(dev)->cap_mask_mutex);
-               memcpy(((struct ib_smp *) mad)->data, dev->node_desc, 64);
+               memcpy(((struct ib_smp *) mad)->data, dev->node_desc,
+                      IB_DEVICE_NODE_DESC_MAX);
                mutex_unlock(&to_mdev(dev)->cap_mask_mutex);
        }
 }