aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firewire
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firewire')
-rw-r--r--drivers/firewire/fw-cdev.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/firewire/fw-cdev.c b/drivers/firewire/fw-cdev.c
index 44ccee26c368..46bc197a047f 100644
--- a/drivers/firewire/fw-cdev.c
+++ b/drivers/firewire/fw-cdev.c
@@ -646,6 +646,10 @@ static int ioctl_create_iso_context(struct client *client, void *buffer)
646 struct fw_cdev_create_iso_context *request = buffer; 646 struct fw_cdev_create_iso_context *request = buffer;
647 struct fw_iso_context *context; 647 struct fw_iso_context *context;
648 648
649 /* We only support one context at this time. */
650 if (client->iso_context != NULL)
651 return -EBUSY;
652
649 if (request->channel > 63) 653 if (request->channel > 63)
650 return -EINVAL; 654 return -EINVAL;
651 655
@@ -792,8 +796,9 @@ static int ioctl_start_iso(struct client *client, void *buffer)
792{ 796{
793 struct fw_cdev_start_iso *request = buffer; 797 struct fw_cdev_start_iso *request = buffer;
794 798
795 if (request->handle != 0) 799 if (client->iso_context == NULL || request->handle != 0)
796 return -EINVAL; 800 return -EINVAL;
801
797 if (client->iso_context->type == FW_ISO_CONTEXT_RECEIVE) { 802 if (client->iso_context->type == FW_ISO_CONTEXT_RECEIVE) {
798 if (request->tags == 0 || request->tags > 15) 803 if (request->tags == 0 || request->tags > 15)
799 return -EINVAL; 804 return -EINVAL;
@@ -810,7 +815,7 @@ static int ioctl_stop_iso(struct client *client, void *buffer)
810{ 815{
811 struct fw_cdev_stop_iso *request = buffer; 816 struct fw_cdev_stop_iso *request = buffer;
812 817
813 if (request->handle != 0) 818 if (client->iso_context == NULL || request->handle != 0)
814 return -EINVAL; 819 return -EINVAL;
815 820
816 return fw_iso_context_stop(client->iso_context); 821 return fw_iso_context_stop(client->iso_context);