summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'drivers')
-rw-r--r--drivers/firewire/core-transaction.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/firewire/core-transaction.c b/drivers/firewire/core-transaction.c
index 7450eb0ac3cd..b4fccabb8fb2 100644
--- a/drivers/firewire/core-transaction.c
+++ b/drivers/firewire/core-transaction.c
@@ -894,8 +894,8 @@ static struct fw_request *allocate_request(struct fw_card *card,
return NULL;
}
- request = kmalloc(sizeof(*request) + length, GFP_ATOMIC);
- if (request == NULL)
+ request = kzalloc_flex(*request, data, DIV_ROUND_UP(length, sizeof(u32)));
+ if (!request)
return NULL;
kref_init(&request->kref);