Message ID | 20241130225249.31899-1-n.zhandarovich@fintech.ru (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | [5.10] IB/core: Fix ib_cache_setup_one error flow cleanup | expand |
diff --git a/drivers/infiniband/core/cache.c b/drivers/infiniband/core/cache.c index 7989b7e1d1c0..21b405abb0e1 100644 --- a/drivers/infiniband/core/cache.c +++ b/drivers/infiniband/core/cache.c @@ -1633,8 +1633,10 @@ int ib_cache_setup_one(struct ib_device *device) rdma_for_each_port (device, p) { err = ib_cache_update(device, p, true); - if (err) + if (err) { + gid_table_cleanup_one(device); return err; + } } return 0;