diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-12 18:26:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-05-12 18:26:29 -0400 |
commit | faa88df860fdfad13afc99fc7201432f9263b3b5 (patch) | |
tree | 0c5b480922c4a2d65154f610ae04928790de96da /drivers | |
parent | 1b52fa98edd1c3e663ea4a06519e3d20976084a8 (diff) | |
parent | 586152560ae8df2a9babf1a8b667d7a145cb8208 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
[SPARC]: Fix warning on prom_getproperty in openprom.c
[SPARC]: Handle UNWIND_INFO properly.
[SPARC64]: Update defconfig.
[SPARC]: show device name in /proc/dvma_map
[SPARC]: Remove duplicate symbol exports
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/sbus/char/openprom.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/sbus/char/openprom.c b/drivers/sbus/char/openprom.c index 383a95f34a0d..239e108b8ed1 100644 --- a/drivers/sbus/char/openprom.c +++ b/drivers/sbus/char/openprom.c | |||
@@ -392,13 +392,16 @@ static int openprom_bsd_ioctl(struct inode * inode, struct file * file, | |||
392 | return -ENOMEM; | 392 | return -ENOMEM; |
393 | } | 393 | } |
394 | 394 | ||
395 | prom_getproperty(op.op_nodeid, str, tmp, len); | 395 | cnt = prom_getproperty(op.op_nodeid, str, tmp, len); |
396 | 396 | if (cnt <= 0) { | |
397 | tmp[len] = '\0'; | 397 | error = -EINVAL; |
398 | } else { | ||
399 | tmp[len] = '\0'; | ||
398 | 400 | ||
399 | if (__copy_to_user(argp, &op, sizeof(op)) != 0 | 401 | if (__copy_to_user(argp, &op, sizeof(op)) != 0 || |
400 | || copy_to_user(op.op_buf, tmp, len) != 0) | 402 | copy_to_user(op.op_buf, tmp, len) != 0) |
401 | error = -EFAULT; | 403 | error = -EFAULT; |
404 | } | ||
402 | 405 | ||
403 | kfree(tmp); | 406 | kfree(tmp); |
404 | kfree(str); | 407 | kfree(str); |