aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma-buf/dma-buf.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma-buf/dma-buf.c')
-rw-r--r--drivers/dma-buf/dma-buf.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index 512bdbc23bbb..4a038dcf5361 100644
--- a/drivers/dma-buf/dma-buf.c
+++ b/drivers/dma-buf/dma-buf.c
@@ -558,8 +558,8 @@ struct dma_buf_attachment *dma_buf_attach(struct dma_buf *dmabuf,
558 if (WARN_ON(!dmabuf || !dev)) 558 if (WARN_ON(!dmabuf || !dev))
559 return ERR_PTR(-EINVAL); 559 return ERR_PTR(-EINVAL);
560 560
561 attach = kzalloc(sizeof(struct dma_buf_attachment), GFP_KERNEL); 561 attach = kzalloc(sizeof(*attach), GFP_KERNEL);
562 if (attach == NULL) 562 if (!attach)
563 return ERR_PTR(-ENOMEM); 563 return ERR_PTR(-ENOMEM);
564 564
565 attach->dev = dev; 565 attach->dev = dev;
@@ -1122,9 +1122,7 @@ static int dma_buf_debug_show(struct seq_file *s, void *unused)
1122 attach_count = 0; 1122 attach_count = 0;
1123 1123
1124 list_for_each_entry(attach_obj, &buf_obj->attachments, node) { 1124 list_for_each_entry(attach_obj, &buf_obj->attachments, node) {
1125 seq_puts(s, "\t"); 1125 seq_printf(s, "\t%s\n", dev_name(attach_obj->dev));
1126
1127 seq_printf(s, "%s\n", dev_name(attach_obj->dev));
1128 attach_count++; 1126 attach_count++;
1129 } 1127 }
1130 1128