summaryrefslogtreecommitdiffstats
path: root/drivers/pci/p2pdma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/p2pdma.c')
-rw-r--r--drivers/pci/p2pdma.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/pci/p2pdma.c b/drivers/pci/p2pdma.c
index a860137fac89..109bd7321962 100644
--- a/drivers/pci/p2pdma.c
+++ b/drivers/pci/p2pdma.c
@@ -502,11 +502,10 @@ calc_map_type_and_dist_warn(struct pci_dev *provider, struct pci_dev *client,
{
struct seq_buf acs_list;
bool acs_redirects;
+ char buf[128];
int ret;
- seq_buf_init(&acs_list, kmalloc(PAGE_SIZE, GFP_KERNEL), PAGE_SIZE);
- if (!acs_list.buffer)
- return -ENOMEM;
+ seq_buf_init(&acs_list, buf, sizeof(buf));
ret = calc_map_type_and_dist(provider, client, dist, &acs_redirects,
&acs_list);
@@ -524,8 +523,6 @@ calc_map_type_and_dist_warn(struct pci_dev *provider, struct pci_dev *client,
pci_name(provider));
}
- kfree(acs_list.buffer);
-
return ret;
}