Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 218410
b: refs/heads/master
c: 0926f91
h: refs/heads/master
v: v3
  • Loading branch information
Eli Cohen authored and David S. Miller committed Oct 25, 2010
1 parent d401fb7 commit 2dd211e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b336369c1e1ad88495895260a9068eb18bc48b6c
refs/heads/master: 0926f91083f34d047abc74f1ca4fa6a9c161f7db
11 changes: 11 additions & 0 deletions trunk/drivers/net/mlx4/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,12 @@ int mlx4_register_mac(struct mlx4_dev *dev, u8 port, u64 mac, int *index)
goto out;
}
}

if (free < 0) {
err = -ENOMEM;
goto out;
}

mlx4_dbg(dev, "Free MAC index is %d\n", free);

if (table->total == table->max) {
Expand Down Expand Up @@ -205,6 +211,11 @@ int mlx4_register_vlan(struct mlx4_dev *dev, u8 port, u16 vlan, int *index)
}
}

if (free < 0) {
err = -ENOMEM;
goto out;
}

if (table->total == table->max) {
/* No free vlan entries */
err = -ENOSPC;
Expand Down

0 comments on commit 2dd211e

Please sign in to comment.