diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-12-28 07:05:36 -0500 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-01-07 22:46:21 -0500 |
commit | 3a6b95c81c522d9dbd36b33d33b08e66c87a6088 (patch) | |
tree | a3e3f99a6908e0dab04e5a05ae24ef71582f27e7 /drivers/s390 | |
parent | 11897539a967059a817175ea57ad586a1faadd80 (diff) |
qeth: fix uaccess handling and get rid of unused variable
[patch] qeth: fix uaccess handling and get rid of unused variable
drivers/s390/net/qeth_main.c: In function `qeth_process_inbound_buffer':
drivers/s390/net/qeth_main.c:2563: warning: unused variable `vlan_addr'
include/asm/uaccess.h: In function `qeth_do_ioctl':
drivers/s390/net/qeth_main.c:4847: warning:
ignoring return value of `copy_to_user'
drivers/s390/net/qeth_main.c:4849: warning:
ignoring return value of `copy_to_user'
drivers/s390/net/qeth_main.c:4996: warning:
ignoring return value of `copy_to_user'
Cc: Frank Pavlic <fpavlic@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/net/qeth_main.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/drivers/s390/net/qeth_main.c b/drivers/s390/net/qeth_main.c index 2bde4f1fb9c2..f17d7cfb4207 100644 --- a/drivers/s390/net/qeth_main.c +++ b/drivers/s390/net/qeth_main.c | |||
@@ -2560,7 +2560,6 @@ qeth_process_inbound_buffer(struct qeth_card *card, | |||
2560 | int offset; | 2560 | int offset; |
2561 | int rxrc; | 2561 | int rxrc; |
2562 | __u16 vlan_tag = 0; | 2562 | __u16 vlan_tag = 0; |
2563 | __u16 *vlan_addr; | ||
2564 | 2563 | ||
2565 | /* get first element of current buffer */ | 2564 | /* get first element of current buffer */ |
2566 | element = (struct qdio_buffer_element *)&buf->buffer->element[0]; | 2565 | element = (struct qdio_buffer_element *)&buf->buffer->element[0]; |
@@ -4844,9 +4843,11 @@ qeth_arp_query(struct qeth_card *card, char __user *udata) | |||
4844 | "(0x%x/%d)\n", | 4843 | "(0x%x/%d)\n", |
4845 | QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc), | 4844 | QETH_CARD_IFNAME(card), qeth_arp_get_error_cause(&rc), |
4846 | tmp, tmp); | 4845 | tmp, tmp); |
4847 | copy_to_user(udata, qinfo.udata, 4); | 4846 | if (copy_to_user(udata, qinfo.udata, 4)) |
4847 | rc = -EFAULT; | ||
4848 | } else { | 4848 | } else { |
4849 | copy_to_user(udata, qinfo.udata, qinfo.udata_len); | 4849 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) |
4850 | rc = -EFAULT; | ||
4850 | } | 4851 | } |
4851 | kfree(qinfo.udata); | 4852 | kfree(qinfo.udata); |
4852 | return rc; | 4853 | return rc; |
@@ -4992,8 +4993,10 @@ qeth_snmp_command(struct qeth_card *card, char __user *udata) | |||
4992 | if (rc) | 4993 | if (rc) |
4993 | PRINT_WARN("SNMP command failed on %s: (0x%x)\n", | 4994 | PRINT_WARN("SNMP command failed on %s: (0x%x)\n", |
4994 | QETH_CARD_IFNAME(card), rc); | 4995 | QETH_CARD_IFNAME(card), rc); |
4995 | else | 4996 | else { |
4996 | copy_to_user(udata, qinfo.udata, qinfo.udata_len); | 4997 | if (copy_to_user(udata, qinfo.udata, qinfo.udata_len)) |
4998 | rc = -EFAULT; | ||
4999 | } | ||
4997 | 5000 | ||
4998 | kfree(ureq); | 5001 | kfree(ureq); |
4999 | kfree(qinfo.udata); | 5002 | kfree(qinfo.udata); |