]> git.baikalelectronics.ru Git - kernel.git/commit
IB/mlx4: fix unitialised variable is_mcast
authorColin Ian King <colin.king@canonical.com>
Sat, 17 May 2014 22:33:44 +0000 (23:33 +0100)
committerRoland Dreier <roland@purestorage.com>
Wed, 28 May 2014 17:00:06 +0000 (10:00 -0700)
commit17fd5cd2f594c072ba40bec9448661a198a45f19
tree890d6235d78856061b8d3339a9338db4d1a30c1a
parent53e5313673903082e1a4b63bd6c576867a14921f
IB/mlx4: fix unitialised variable is_mcast

Commit 9265438b8060 ("IB/mlx4: Handle Ethernet L2 parameters for IP
based GID addressing") introduced a bug where is_mcast is now no
longer initialized on the non-multicast condition and so it can be
any random value from the stack.  This issue was detected by cppcheck:

    [drivers/infiniband/hw/mlx4/ah.c:103]: (error) Uninitialized
      variable: is_mcast

Simple fix is to initialise is_mcast to zero.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/ah.c