IB/core: Release allocated memory in cache setup failure
authorLeon Romanovsky <leon@kernel.org>
Thu, 3 Nov 2016 14:44:11 +0000 (16:44 +0200)
committerDoug Ledford <dledford@redhat.com>
Sat, 3 Dec 2016 18:12:52 +0000 (13:12 -0500)
commitaa6aae38f7fb2c030f326a6dd10b58fff1851dfa
treed3396442e85da657cb01509917d2e6b2087b364c
parenta0b3455fcb2d1b3e486349a4a51803c3cb3847b5
IB/core: Release allocated memory in cache setup failure

The failure in ib_cache_setup_one function during
ib_register_device will leave leaked allocated memory.

Fixes: 03db3a2d81e6 ("IB/core: Add RoCE GID table management")
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
drivers/infiniband/core/cache.c