aboutsummaryrefslogtreecommitdiff
path: root/drivers/firewire/core-cdev.c
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2014-11-22 11:07:49 +0000
committerMark Brown <broonie@kernel.org>2014-11-22 11:07:49 +0000
commit7280e4222be4e88e2e8dd3cf797f093ffaebfb8b (patch)
tree0c70042dff00ef136c449ae922e48b660b17c272 /drivers/firewire/core-cdev.c
parent3070bdc3c302c80996502639e03a2e550571e152 (diff)
parent1f0f80ecae848b0ca2ca632e94568721494f09f0 (diff)
Merge branch 'linux-linaro-lsk-v3.14' into linux-linaro-lsk-v3.14-androidlsk-v3.14-android-14.11
Diffstat (limited to 'drivers/firewire/core-cdev.c')
-rw-r--r--drivers/firewire/core-cdev.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/firewire/core-cdev.c b/drivers/firewire/core-cdev.c
index d7d5c8af92b9..6d4456898007 100644
--- a/drivers/firewire/core-cdev.c
+++ b/drivers/firewire/core-cdev.c
@@ -1637,8 +1637,7 @@ static int dispatch_ioctl(struct client *client,
_IOC_SIZE(cmd) > sizeof(buffer))
return -ENOTTY;
- if (_IOC_DIR(cmd) == _IOC_READ)
- memset(&buffer, 0, _IOC_SIZE(cmd));
+ memset(&buffer, 0, sizeof(buffer));
if (_IOC_DIR(cmd) & _IOC_WRITE)
if (copy_from_user(&buffer, arg, _IOC_SIZE(cmd)))