diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c index 1699a8e309ef..fea18498b01c 100644 --- a/drivers/dma-buf/dma-buf.c +++ b/drivers/dma-buf/dma-buf.c @@ -60,6 +60,9 @@ static void dma_buf_release(struct dentry *dentry) dmabuf = dentry->d_fsdata; + if (!dmabuf) + return; + BUG_ON(dmabuf->vmapping_counter); /*