diff --git a/[refs] b/[refs] index d605bc0db28e..0b2202af52e6 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a9fbc3b73127efba9276e172daa8d122f0fac1a8 +refs/heads/master: 2ed9201bdd9a8e462d768a838fb2bc944c6887a4 diff --git a/trunk/drivers/base/dma-buf.c b/trunk/drivers/base/dma-buf.c index 97450a52172c..8afe2dd17912 100644 --- a/trunk/drivers/base/dma-buf.c +++ b/trunk/drivers/base/dma-buf.c @@ -192,10 +192,11 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf, if (attach == NULL) return ERR_PTR(-ENOMEM); - mutex_lock(&dmabuf->lock); - attach->dev = dev; attach->dmabuf = dmabuf; + + mutex_lock(&dmabuf->lock); + if (dmabuf->ops->attach) { ret = dmabuf->ops->attach(dmabuf, dev, attach); if (ret)