diff options
author | David S. Miller <davem@davemloft.net> | 2016-11-16 19:57:45 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-11-16 19:57:45 +0100 |
commit | a11485b737aa9634e9dbb6f53e65e3a801fd1e4c (patch) | |
tree | 05373315f75629a5eb73e1601f1a8b4020aa6aa6 | |
parent | Merge branch 'nway-reset' (diff) | |
parent | amd-xgbe: Fix maximum GPIO value check (diff) | |
download | linux-a11485b737aa9634e9dbb6f53e65e3a801fd1e4c.tar.xz linux-a11485b737aa9634e9dbb6f53e65e3a801fd1e4c.zip |
Merge branch 'amd-xgbe-next'
Tom Lendacky says:
====================
amd-xgbe: AMD XGBE driver updates 2016-11-15
This patch series addresses some minor issues found in the recently
accepted patch series for the AMD XGBE driver.
The following fixes are included in this driver update series:
- Fix a possibly uninitialized variable in the debugfs support
- Fix the GPIO pin number constraint check
This patch series is based on net-next.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c | 2 | ||||
-rw-r--r-- | drivers/net/ethernet/amd/xgbe/xgbe-dev.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c index 0c0140decbc2..7546b660d6b5 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c @@ -153,7 +153,7 @@ static ssize_t xgbe_common_write(const char __user *buffer, size_t count, int ret; if (*ppos != 0) - return 0; + return -EINVAL; if (count >= sizeof(workarea)) return -ENOSPC; diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c index 30056e24e1fc..aaf0350076a9 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-dev.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-dev.c @@ -1099,7 +1099,7 @@ static int xgbe_clr_gpio(struct xgbe_prv_data *pdata, unsigned int gpio) { unsigned int reg; - if (gpio > 16) + if (gpio > 15) return -EINVAL; reg = XGMAC_IOREAD(pdata, MAC_GPIOSR); @@ -1114,7 +1114,7 @@ static int xgbe_set_gpio(struct xgbe_prv_data *pdata, unsigned int gpio) { unsigned int reg; - if (gpio > 16) + if (gpio > 15) return -EINVAL; reg = XGMAC_IOREAD(pdata, MAC_GPIOSR); |