return ERR_PTR(ret);
  }
  
+ /**
+  * amdgpu_gem_map_attach - &dma_buf_ops.attach implementation
+  * @dma_buf: shared DMA buffer
+  * @target_dev: target device
+  * @attach: DMA-buf attachment
+  *
+  * Makes sure that the shared DMA buffer can be accessed by the target device.
+  * For now, simply pins it to the GTT domain, where it should be accessible by
+  * all DMA devices.
+  *
+  * Returns:
+  * 0 on success or negative error code.
+  */
  static int amdgpu_gem_map_attach(struct dma_buf *dma_buf,
 -                               struct device *target_dev,
                                 struct dma_buf_attachment *attach)
  {
        struct drm_gem_object *obj = dma_buf->priv;
 
        ectx.abort = false;
        ectx.last_jump = 0;
        if (ws)
-               ectx.ws = kcalloc(4, ws, GFP_KERNEL);
 -              ectx.ws = kzalloc(4 * ws, GFP_ATOMIC);
++              ectx.ws = kcalloc(4, ws, GFP_ATOMIC);
        else
                ectx.ws = NULL;