]> www.infradead.org Git - users/jedix/linux-maple.git/commit
net: qlcnic: clean up sysfs error codes
authorVladimir Zapolskiy <vz@mleia.com>
Tue, 26 May 2015 00:49:45 +0000 (03:49 +0300)
committerEthan Zhao <ethan.zhao@oracle.com>
Tue, 20 Oct 2015 02:39:41 +0000 (11:39 +0900)
commit7777b3ba0fc6372404318e3b80b60466890c8193
tree9b948ef2de4bffb24e82e83b6f58f7b38965b4bc
parent40757108143425c1d7ad9ccc1f8f30864aa794c5
net: qlcnic: clean up sysfs error codes

Orabug: 22066190

Replace confusing QL_STATUS_INVALID_PARAM == -1 == -EPERM with -EINVAL
and QLC_STATUS_UNSUPPORTED_CMD == -2 == -ENOENT with -EOPNOTSUPP, the
latter error code is arguable, but it is already used in the driver,
so let it be here as well.

Also remove always false (!buf) check on read(), the driver should
not care if userspace gets its EFAULT or not.

Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Acked-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ethan Zhao <ethan.zhao@oracle.com>
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c