Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2855289pxb; Mon, 18 Apr 2022 09:37:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw01JxteQrfzYBBfqoWU8mmGuUXEPy+2lk4nRyxBkuzLiE2S4tXlc+J9JPWPx98YbkPkk+d X-Received: by 2002:a17:902:744a:b0:158:9b85:192e with SMTP id e10-20020a170902744a00b001589b85192emr11803617plt.96.1650299877641; Mon, 18 Apr 2022 09:37:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650299877; cv=none; d=google.com; s=arc-20160816; b=rs2uxLnv8hlYuChmq5OGW07px7te+Wu0jmMJEwvjYDwTN2+n6EpqheAoj/tGFnckfM fIrIbi5Am0Tj+Yn7FSQ/VTlRKHAKYnXc+VTGEtUjjlSLXeHOUX+fu/aOdyB/6nzTpWbn /6/huqD2VDpMqKs27zP+j5+5p8jhn5h/Bz9gHkYdb+DT52DCNCEX7eSmkzRqSKCNT1Ob Sb1IQ8I5n/9hNtBKXvo3mX16o85HcI2Y/HVcwp9TRdL67rqHfEg2vhdR9Rodvvox64bE h91UFwhdHrqH5CbQmOfCBWXxAV5Kurq3WsQgzUjytrEgZi7Z73moMtCZEpUsK9yQALi7 y5mA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8SyaCyS9jEyGsilRrToaXFZwJWd+lkixu+wiSNd4Quk=; b=RCluhVjVUnE56VT6hz3Qe8yCL3+8MZr3l0j/DxZNAqgMGVC+yxx7p59JY8d1Nxs6WO 91Kuym7lPFarq4r8ekmAmkbhJKuo/GVANNELx2NJAbDzUEjWFrxtAslUi/S/Z4vGVinK 60BiyMj4nThnI22iRKt+XFh3jbk+Z8uX1qb8Z1zjHPrkcHcAcTj6AOrJB5nZHmxqQfGJ TWejnM3YcAYjtNG5YFYqwvFaHvBv7jiqNUD1emxb8tRc8ekDMhVETHidYmYvmDrS4qoE 0szcwf3oWHvEbMOCUQTzT4Wcj6qQuDncBLLL6RG925RuPw1Hk+oipO2qOoPPjIurg+xf 6Hjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DrIMW4nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg5-20020a17090b1e0500b001cbb3f8d111si9900296pjb.68.2022.04.18.09.37.39; Mon, 18 Apr 2022 09:37:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=DrIMW4nj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234599AbiDRMYq (ORCPT + 99 others); Mon, 18 Apr 2022 08:24:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34018 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239012AbiDRMXR (ORCPT ); Mon, 18 Apr 2022 08:23:17 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39E2E1FA53; Mon, 18 Apr 2022 05:18:47 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id E4562B80EDB; Mon, 18 Apr 2022 12:18:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5A1C2C385A1; Mon, 18 Apr 2022 12:18:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1650284324; bh=lPXSw59v08NPSWuDxS3W0dFUB6XP8tMGUG8g+kBOXB8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DrIMW4njU+HS1P5kSQkS9ShZhXAye0eCgTCFIsAojgBKrkZZTeILTDo5gR1V/xxp1 L4zMrIuIVG7h3wDtmnicQqN/zYssoMvry+TWRPUd/GpImluf6q9odR+By0H8X4OR5Q ukssjDN+7LgMXyQPEs3LjrWGAi6txHCF56FLlGa8= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Vadim Pasternak , Ido Schimmel , Jakub Kicinski , Sasha Levin Subject: [PATCH 5.17 075/219] mlxsw: i2c: Fix initialization error flow Date: Mon, 18 Apr 2022 14:10:44 +0200 Message-Id: <20220418121208.114720231@linuxfoundation.org> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220418121203.462784814@linuxfoundation.org> References: <20220418121203.462784814@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vadim Pasternak [ Upstream commit d452088cdfd5a4ad9d96d847d2273fe958d6339b ] Add mutex_destroy() call in driver initialization error flow. Fixes: 6882b0aee180f ("mlxsw: Introduce support for I2C bus") Signed-off-by: Vadim Pasternak Signed-off-by: Ido Schimmel Link: https://lore.kernel.org/r/20220407070703.2421076-1-idosch@nvidia.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin --- drivers/net/ethernet/mellanox/mlxsw/i2c.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/ethernet/mellanox/mlxsw/i2c.c b/drivers/net/ethernet/mellanox/mlxsw/i2c.c index 939b692ffc33..ce843ea91464 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/i2c.c +++ b/drivers/net/ethernet/mellanox/mlxsw/i2c.c @@ -650,6 +650,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; -- 2.35.1