Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 206830
b: refs/heads/master
c: 0244f57
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Jun 20, 2010
1 parent 4ade4ea commit 27d4465
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 08bd34c98d631fe85744d4c920c80f48a1d95f54
refs/heads/master: 0244f57302f7e8bebd2f1ab58767eac2e9f678a6
8 changes: 8 additions & 0 deletions trunk/drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,6 +627,8 @@ static void release_request(struct client *client,
kfree(r->data);
else
fw_send_response(r->card, r->request, RCODE_CONFLICT_ERROR);

fw_card_put(r->card);
kfree(r);
}

Expand All @@ -641,6 +643,9 @@ static void handle_request(struct fw_card *card, struct fw_request *request,
void *fcp_frame = NULL;
int ret;

/* card may be different from handler->client->device->card */
fw_card_get(card);

r = kmalloc(sizeof(*r), GFP_ATOMIC);
e = kmalloc(sizeof(*e), GFP_ATOMIC);
if (r == NULL || e == NULL)
Expand Down Expand Up @@ -686,6 +691,8 @@ static void handle_request(struct fw_card *card, struct fw_request *request,

if (!is_fcp_request(request))
fw_send_response(card, request, RCODE_CONFLICT_ERROR);

fw_card_put(card);
}

static void release_address_handler(struct client *client,
Expand Down Expand Up @@ -768,6 +775,7 @@ static int ioctl_send_response(struct client *client, union ioctl_arg *arg)
}
fw_send_response(r->card, r->request, a->rcode);
out:
fw_card_put(r->card);
kfree(r);

return ret;
Expand Down

0 comments on commit 27d4465

Please sign in to comment.