Skip to content

Commit a11485b

Browse files
committed
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 <[email protected]>
2 parents 54dbf3a + 1c1f619 commit a11485b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

drivers/net/ethernet/amd/xgbe/xgbe-debugfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static ssize_t xgbe_common_write(const char __user *buffer, size_t count,
153153
int ret;
154154

155155
if (*ppos != 0)
156-
return 0;
156+
return -EINVAL;
157157

158158
if (count >= sizeof(workarea))
159159
return -ENOSPC;

drivers/net/ethernet/amd/xgbe/xgbe-dev.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1099,7 +1099,7 @@ static int xgbe_clr_gpio(struct xgbe_prv_data *pdata, unsigned int gpio)
10991099
{
11001100
unsigned int reg;
11011101

1102-
if (gpio > 16)
1102+
if (gpio > 15)
11031103
return -EINVAL;
11041104

11051105
reg = XGMAC_IOREAD(pdata, MAC_GPIOSR);
@@ -1114,7 +1114,7 @@ static int xgbe_set_gpio(struct xgbe_prv_data *pdata, unsigned int gpio)
11141114
{
11151115
unsigned int reg;
11161116

1117-
if (gpio > 16)
1117+
if (gpio > 15)
11181118
return -EINVAL;
11191119

11201120
reg = XGMAC_IOREAD(pdata, MAC_GPIOSR);

0 commit comments

Comments
 (0)