]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4_core: Don't leak mailbox for SET_PORT on Ethernet ports
authorRoland Dreier <rolandd@cisco.com>
Tue, 31 Mar 2009 16:54:15 +0000 (09:54 -0700)
committerRoland Dreier <rolandd@cisco.com>
Tue, 31 Mar 2009 16:54:15 +0000 (09:54 -0700)
commitc35bdfd1f5308d8e5f0ef914e417a20b4a020d82
treea76d32027309de5bc16b345bd74bcb0c712df07c
parent43443f2ee2d8d103f2d1f97bcb81e6045d29cd32
mlx4_core: Don't leak mailbox for SET_PORT on Ethernet ports

Commit 648b77e4 ("mlx4_core: Don't perform SET_PORT command for
Ethernet ports") introduced a leak of mailbox buffers when SET_PORT
was called for Ethernet ports, since it added a return after the
mailbox was allocated.  Fix this by checking the port type and
returning *before* allocating the mailbox.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
drivers/net/mlx4/port.c