Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185106
b: refs/heads/master
c: 6458229
h: refs/heads/master
v: v3
  • Loading branch information
Stefan Richter committed Feb 24, 2010
1 parent 7ff52a4 commit e5b2d87
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 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: 6e95dea728f4af36c033fcf2318529bd46dae540
refs/heads/master: 64582298b9c29535188380f488873e7d2196a2eb
17 changes: 5 additions & 12 deletions trunk/drivers/firewire/core-cdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1349,6 +1349,9 @@ static int dispatch_ioctl(struct client *client,
union ioctl_arg buffer;
int ret;

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

if (_IOC_TYPE(cmd) != '#' ||
_IOC_NR(cmd) >= ARRAY_SIZE(ioctl_handlers))
return -EINVAL;
Expand All @@ -1375,24 +1378,14 @@ static int dispatch_ioctl(struct client *client,
static long fw_device_op_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
struct client *client = file->private_data;

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

return dispatch_ioctl(client, cmd, (void __user *) arg);
return dispatch_ioctl(file->private_data, cmd, (void __user *)arg);
}

#ifdef CONFIG_COMPAT
static long fw_device_op_compat_ioctl(struct file *file,
unsigned int cmd, unsigned long arg)
{
struct client *client = file->private_data;

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

return dispatch_ioctl(client, cmd, compat_ptr(arg));
return dispatch_ioctl(file->private_data, cmd, compat_ptr(arg));
}
#endif

Expand Down

0 comments on commit e5b2d87

Please sign in to comment.