diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-05-18 01:37:44 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-18 01:37:49 -0400 |
commit | dc3f81b129b5439ba7bac265bbc6a51a39275dae (patch) | |
tree | 216030731d911249496d2e97206cd61431e31c89 /drivers/hid/hidraw.c | |
parent | d2517a49d55536b38c7a87e5289550cfedaa4dcc (diff) | |
parent | 1406de8e11eb043681297adf86d6892ff8efc27a (diff) |
Merge commit 'v2.6.30-rc6' into perfcounters/core
Merge reason: this branch was on an -rc4 base, merge it up to -rc6
to get the latest upstream fixes.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/hid/hidraw.c')
-rw-r--r-- | drivers/hid/hidraw.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/hid/hidraw.c b/drivers/hid/hidraw.c index e263d4731179..00ccf4b1985d 100644 --- a/drivers/hid/hidraw.c +++ b/drivers/hid/hidraw.c | |||
@@ -285,8 +285,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
285 | 285 | ||
286 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { | 286 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWNAME(0))) { |
287 | int len; | 287 | int len; |
288 | if (!hid->name) | 288 | if (!hid->name) { |
289 | return 0; | 289 | ret = 0; |
290 | break; | ||
291 | } | ||
290 | len = strlen(hid->name) + 1; | 292 | len = strlen(hid->name) + 1; |
291 | if (len > _IOC_SIZE(cmd)) | 293 | if (len > _IOC_SIZE(cmd)) |
292 | len = _IOC_SIZE(cmd); | 294 | len = _IOC_SIZE(cmd); |
@@ -297,8 +299,10 @@ static long hidraw_ioctl(struct file *file, unsigned int cmd, | |||
297 | 299 | ||
298 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { | 300 | if (_IOC_NR(cmd) == _IOC_NR(HIDIOCGRAWPHYS(0))) { |
299 | int len; | 301 | int len; |
300 | if (!hid->phys) | 302 | if (!hid->phys) { |
301 | return 0; | 303 | ret = 0; |
304 | break; | ||
305 | } | ||
302 | len = strlen(hid->phys) + 1; | 306 | len = strlen(hid->phys) + 1; |
303 | if (len > _IOC_SIZE(cmd)) | 307 | if (len > _IOC_SIZE(cmd)) |
304 | len = _IOC_SIZE(cmd); | 308 | len = _IOC_SIZE(cmd); |