Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86373
b: refs/heads/master
c: fae6031
h: refs/heads/master
i:
  86371: 1e56e2a
v: v3
  • Loading branch information
Stefan Richter committed Feb 21, 2008
1 parent 20b6bd0 commit 9328708
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 09d7328e62e3b4cefe4bf3eeeeacb54f62a7ae5c
refs/heads/master: fae603121428ba83b7343c88e68a7144525ab3eb
9 changes: 7 additions & 2 deletions trunk/drivers/firewire/fw-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,10 @@ static int ioctl_create_iso_context(struct client *client, void *buffer)
struct fw_cdev_create_iso_context *request = buffer;
struct fw_iso_context *context;

/* We only support one context at this time. */
if (client->iso_context != NULL)
return -EBUSY;

if (request->channel > 63)
return -EINVAL;

Expand Down Expand Up @@ -792,8 +796,9 @@ static int ioctl_start_iso(struct client *client, void *buffer)
{
struct fw_cdev_start_iso *request = buffer;

if (request->handle != 0)
if (client->iso_context == NULL || request->handle != 0)
return -EINVAL;

if (client->iso_context->type == FW_ISO_CONTEXT_RECEIVE) {
if (request->tags == 0 || request->tags > 15)
return -EINVAL;
Expand All @@ -810,7 +815,7 @@ static int ioctl_stop_iso(struct client *client, void *buffer)
{
struct fw_cdev_stop_iso *request = buffer;

if (request->handle != 0)
if (client->iso_context == NULL || request->handle != 0)
return -EINVAL;

return fw_iso_context_stop(client->iso_context);
Expand Down

0 comments on commit 9328708

Please sign in to comment.