diff options
Diffstat (limited to 'drivers/firewire/core-cdev.c')
-rw-r--r-- | drivers/firewire/core-cdev.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c index 5d997a33907e..2a3973a7c441 100644 --- a/drivers/firewire/core-cdev.c +++ b/drivers/firewire/core-cdev.c | |||
@@ -1637,8 +1637,7 @@ static int dispatch_ioctl(struct client *client, | |||
1637 | _IOC_SIZE(cmd) > sizeof(buffer)) | 1637 | _IOC_SIZE(cmd) > sizeof(buffer)) |
1638 | return -ENOTTY; | 1638 | return -ENOTTY; |
1639 | 1639 | ||
1640 | if (_IOC_DIR(cmd) == _IOC_READ) | 1640 | memset(&buffer, 0, sizeof(buffer)); |
1641 | memset(&buffer, 0, _IOC_SIZE(cmd)); | ||
1642 | 1641 | ||
1643 | if (_IOC_DIR(cmd) & _IOC_WRITE) | 1642 | if (_IOC_DIR(cmd) & _IOC_WRITE) |
1644 | if (copy_from_user(&buffer, arg, _IOC_SIZE(cmd))) | 1643 | if (copy_from_user(&buffer, arg, _IOC_SIZE(cmd))) |