]> git.baikalelectronics.ru Git - kernel.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)
committerDavid S. Miller <davem@davemloft.net>
Fri, 29 May 2015 03:14:45 +0000 (20:14 -0700)
commitddab9b46b57cb04328207bcdac4762209a6c0bba
treedf7f67f44ad0a9538d714e88c8da8fca68d38f5c
parentefd81bf81fdc622386f5f9be9ab64a2f0966f6ed
net: qlcnic: clean up sysfs error codes

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>
drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sysfs.c