Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97039
b: refs/heads/master
c: 551f4cb
h: refs/heads/master
i:
  97037: d256c7a
  97035: 1e01d9a
  97031: cd6a351
  97023: 1f70e26
v: v3
  • Loading branch information
Jay Fenlason authored and Stefan Richter committed May 20, 2008
1 parent af49fe4 commit 34ed798
Show file tree
Hide file tree
Showing 2 changed files with 15 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: 93c596f7d611b379302bbdd26f31acdf72f4859a
refs/heads/master: 551f4cb9de716ffcdaf968c99a450c22ff12e8c3
14 changes: 14 additions & 0 deletions trunk/drivers/firewire/fw-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,11 @@ static int fw_device_op_open(struct inode *inode, struct file *file)
if (device == NULL)
return -ENODEV;

if (fw_device_is_shutdown(device)) {
fw_device_put(device);
return -ENODEV;
}

client = kzalloc(sizeof(*client), GFP_KERNEL);
if (client == NULL) {
fw_device_put(device);
Expand Down Expand Up @@ -901,6 +906,9 @@ fw_device_op_ioctl(struct file *file,
{
struct client *client = file->private_data;

if (fw_device_is_shutdown(client->device))
return -ENODEV;

return dispatch_ioctl(client, cmd, (void __user *) arg);
}

Expand All @@ -911,6 +919,9 @@ fw_device_op_compat_ioctl(struct file *file,
{
struct client *client = file->private_data;

if (fw_device_is_shutdown(client->device))
return -ENODEV;

return dispatch_ioctl(client, cmd, compat_ptr(arg));
}
#endif
Expand All @@ -922,6 +933,9 @@ static int fw_device_op_mmap(struct file *file, struct vm_area_struct *vma)
unsigned long size;
int page_count, retval;

if (fw_device_is_shutdown(client->device))
return -ENODEV;

/* FIXME: We could support multiple buffers, but we don't. */
if (client->buffer.pages != NULL)
return -EBUSY;
Expand Down

0 comments on commit 34ed798

Please sign in to comment.