mirror of
https://github.com/torvalds/linux
synced 2024-11-05 18:23:50 +00:00
net/mlx4: Handle return codes in mlx4_qp_attach_common
Both new_steering_entry() and existing_steering_entry() return values based on their success or failure, but currently they fall through silently. This can make troubleshooting difficult, as we were unable to tell which one of these two functions returned errors or specifically what code was returned. This patch remedies that situation by passing the return codes to err, which is returned by mlx4_qp_attach_common() itself. This also addresses a leak in the call to mlx4_bitmap_free() as well. Signed-off-by: Robb Manes <rmanes@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
c047a1f918
commit
23860f103b
1 changed files with 4 additions and 3 deletions
|
@ -1184,10 +1184,11 @@ int mlx4_qp_attach_common(struct mlx4_dev *dev, struct mlx4_qp *qp, u8 gid[16],
|
|||
if (prot == MLX4_PROT_ETH) {
|
||||
/* manage the steering entry for promisc mode */
|
||||
if (new_entry)
|
||||
new_steering_entry(dev, port, steer, index, qp->qpn);
|
||||
err = new_steering_entry(dev, port, steer,
|
||||
index, qp->qpn);
|
||||
else
|
||||
existing_steering_entry(dev, port, steer,
|
||||
index, qp->qpn);
|
||||
err = existing_steering_entry(dev, port, steer,
|
||||
index, qp->qpn);
|
||||
}
|
||||
if (err && link && index != -1) {
|
||||
if (index < dev->caps.num_mgms)
|
||||
|
|
Loading…
Reference in a new issue