Skip to content

Commit

Permalink
firewire net: Clear dev->broadcast_rcv_context and dev->broadcast_sta…
Browse files Browse the repository at this point in the history
…te after destruction of context.

Clear dev->broadcast_rcv_context to NULL and set dev->broadcast_state
to FWNET_BROADCAST_ERROR after descruction of broadcast context.

Signed-off-by: YOSHIFUJI Hideaki <[email protected]>
Signed-off-by: Stefan Richter <[email protected]>
  • Loading branch information
yoshfuji authored and Stefan Richter committed Mar 13, 2013
1 parent 48a8406 commit f60bac4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/firewire/net.c
Original file line number Diff line number Diff line change
Expand Up @@ -1626,11 +1626,14 @@ static int fwnet_remove(struct device *_dev)
fwnet_fifo_stop(dev);
if (dev->broadcast_rcv_context) {
fw_iso_context_stop(dev->broadcast_rcv_context);

kfree(dev->broadcast_rcv_buffer_ptrs);
dev->broadcast_rcv_buffer_ptrs = NULL;
fw_iso_buffer_destroy(&dev->broadcast_rcv_buffer,
dev->card);
fw_iso_context_destroy(dev->broadcast_rcv_context);
dev->broadcast_rcv_context = NULL;
dev->broadcast_state = FWNET_BROADCAST_ERROR;
}
for (i = 0; dev->queued_datagrams && i < 5; i++)
ssleep(1);
Expand Down

0 comments on commit f60bac4

Please sign in to comment.