Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5adebafb authored by Leon Romanovsky's avatar Leon Romanovsky Committed by Doug Ledford
Browse files

IB/core: Fix missed clean call in registration path



In case of failure returned from query function in
IB device registration, we need to clean IB cache which
was missed.

This change fixes it.

Fixes: 3e153a93 ('IB/core: Save the device attributes on the device
structure')
Signed-off-by: default avatarLeon Romanovsky <leonro@mellanox.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Reviewed-by: default avatarSagi Grimberg <sagig@mellanox.com>
Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
parent c2bab619
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -358,6 +358,7 @@ int ib_register_device(struct ib_device *device,
	ret = device->query_device(device, &device->attrs, &uhw);
	ret = device->query_device(device, &device->attrs, &uhw);
	if (ret) {
	if (ret) {
		printk(KERN_WARNING "Couldn't query the device attributes\n");
		printk(KERN_WARNING "Couldn't query the device attributes\n");
		ib_cache_cleanup_one(device);
		goto out;
		goto out;
	}
	}