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

Commit c99f549b authored by Vadim Pasternak's avatar Vadim Pasternak Committed by Greg Kroah-Hartman
Browse files

mlxsw: i2c: Fix initialization error flow



[ Upstream commit d452088cdfd5a4ad9d96d847d2273fe958d6339b ]

Add mutex_destroy() call in driver initialization error flow.

Fixes: 6882b0ae ("mlxsw: Introduce support for I2C bus")
Signed-off-by: default avatarVadim Pasternak <vadimp@nvidia.com>
Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/20220407070703.2421076-1-idosch@nvidia.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 38b0bd0f
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -516,6 +516,7 @@ static int mlxsw_i2c_probe(struct i2c_client *client,
	return 0;

errout:
	mutex_destroy(&mlxsw_i2c->cmd.lock);
	i2c_set_clientdata(client, NULL);

	return err;