aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-transaction.c4
-rw-r--r--drivers/firewire/fw-transaction.h4
2 files changed, 7 insertions, 1 deletions
diff --git a/drivers/firewire/fw-transaction.c b/drivers/firewire/fw-transaction.c
index c4b3417a5dac..3ce8e2fbe15f 100644
--- a/drivers/firewire/fw-transaction.c
+++ b/drivers/firewire/fw-transaction.c
@@ -605,8 +605,10 @@ fw_send_response(struct fw_card *card, struct fw_request *request, int rcode)
605 * check is sufficient to ensure we don't send response to 605 * check is sufficient to ensure we don't send response to
606 * broadcast packets or posted writes. 606 * broadcast packets or posted writes.
607 */ 607 */
608 if (request->ack != ACK_PENDING) 608 if (request->ack != ACK_PENDING) {
609 kfree(request);
609 return; 610 return;
611 }
610 612
611 if (rcode == RCODE_COMPLETE) 613 if (rcode == RCODE_COMPLETE)
612 fw_fill_response(&request->response, request->request_header, 614 fw_fill_response(&request->response, request->request_header,
diff --git a/drivers/firewire/fw-transaction.h b/drivers/firewire/fw-transaction.h
index 5abed193f4a6..5ceaccd10564 100644
--- a/drivers/firewire/fw-transaction.h
+++ b/drivers/firewire/fw-transaction.h
@@ -123,6 +123,10 @@ typedef void (*fw_transaction_callback_t)(struct fw_card *card, int rcode,
123 size_t length, 123 size_t length,
124 void *callback_data); 124 void *callback_data);
125 125
126/*
127 * Important note: The callback must guarantee that either fw_send_response()
128 * or kfree() is called on the @request.
129 */
126typedef void (*fw_address_callback_t)(struct fw_card *card, 130typedef void (*fw_address_callback_t)(struct fw_card *card,
127 struct fw_request *request, 131 struct fw_request *request,
128 int tcode, int destination, int source, 132 int tcode, int destination, int source,