From patchwork Tue May 10 15:32:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845181 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16628C433F5 for ; Tue, 10 May 2022 15:34:43 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 25ECC17F4; Tue, 10 May 2022 17:33:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 25ECC17F4 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196882; bh=UtHvA/2tmkAUzu7O2aW9JjKr0ZJT7KwjmXXw+uM3/pk=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=WWhMEsCD3dw34SkGUYoXqMl6VBVc0n1t5oOnvuQh7T5dLWSLeDBASfx8J02OJG3Eq IvvYMn4it1yE+Rp0nq8y3D4vyoZN4+6Ngnz7aM/vg9RR6qSiOQQoZ9xBcdt9X/vkkL 99zrFP916Zjccpj/KILOrytXOzVLKjfR7nL/b/no= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 69CAAF80240; Tue, 10 May 2022 17:33:25 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E71D3F804BB; Tue, 10 May 2022 17:33:23 +0200 (CEST) Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2F5E5F801F5 for ; Tue, 10 May 2022 17:33:20 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2F5E5F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="SqlnRkOB" Received: by mail-pj1-x1031.google.com with SMTP id fv2so16190150pjb.4 for ; Tue, 10 May 2022 08:33:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XgBcNoHF+H5YHWhoRdIUmpBDPDoFkHi2u+F0mxHHboU=; b=SqlnRkOBavZUfRbJwMbK/YH4lJboO/H6W9MGbF1Yr8P3VdOycLTYi6X8sxipFmctzz Sip8xnN1tVt+E+KB3GObsdE4JlFanBX/u27osIqtF0PSPAJ1XR1F6QACv6LQIc4U/dyr 7jwaKmTINGJsQxtoXTY7xQt+ULsVPni3miKhV6QEWS8GpL0apIdYLDp4iizJ0IwJcrGO Z1kAXxv/Gg20ZCFB5DSXa7QGkB1NNF9jcxOpv2NgM7kfpcR3+mRvB6jQKpjcoKhg0ZzR AlHth8RnP5dD7DJ7f9MwHjTrZuGMgQcr4lFnA96B7sJJvi+GRlZtDzbImfHt7wyaFTvi z+iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XgBcNoHF+H5YHWhoRdIUmpBDPDoFkHi2u+F0mxHHboU=; b=Y/7Z6IcktkcnLqssAfMzUcjUS2YcrdjqW9quWQRX8zPV5+nHKV2zgc95/fwjK9HcuZ RG15qCWwl14SMjlQV3mhG2RfXdzSPD/6erUWYc3riDMNv+OdNgg3pI3Hcn4qdp11SbiY PhDlFAVxJqVj2KB4iynTc+9pU0bpUf/66tWRZF3j6pcNEFAwjTlcDFAVxY6bzP0xaVXa pcWydvevK/9bdHmrDSxF8+c4zE2RUMEqJ+qkF1He1RrxPkgBbzeD8vbDDasGJ82apQXS l9S0dT2UoOCc5XXy6gUQ9TSYtNkJUXhcDIgGVl8NBiGlmyu2CSSBiql91+xmoDx3Tenb 6YQA== X-Gm-Message-State: AOAM531aCY2gG7GgcBt0fQAsVVvywspM/Cu5Vtti/8clJzuWmCVXbpOy WBf65yZah3LcWQQ6cMt4cQ== X-Google-Smtp-Source: ABdhPJxIg+lFFBXwy/xu/9dN8ld18Dmoa8zxjI0DMkcnvYRYOp5IZmTm31F5Gz51fbFrsofGjLfMyA== X-Received: by 2002:a17:90b:4a90:b0:1dc:aec3:c04 with SMTP id lp16-20020a17090b4a9000b001dcaec30c04mr546709pjb.118.1652196798797; Tue, 10 May 2022 08:33:18 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:18 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 1/6] ASoC: cs42l52: Fix the error handling of cs42l56_i2c_probe() Date: Tue, 10 May 2022 23:32:46 +0800 Message-Id: <20220510153251.1741210-2-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The driver should goto label 'err_enable' when failing at regmap_read(). Signed-off-by: Zheyu Ma --- sound/soc/codecs/cs42l56.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs42l56.c b/sound/soc/codecs/cs42l56.c index 2c4e09b43199..dc23007336c5 100644 --- a/sound/soc/codecs/cs42l56.c +++ b/sound/soc/codecs/cs42l56.c @@ -1245,7 +1245,7 @@ static int cs42l56_i2c_probe(struct i2c_client *i2c_client) ret = regmap_read(cs42l56->regmap, CS42L56_CHIP_ID_1, ®); if (ret) { dev_err(&i2c_client->dev, "Failed to read chip ID: %d\n", ret); - return ret; + goto err_enable; } devid = reg & CS42L56_CHIP_ID_MASK; From patchwork Tue May 10 15:32:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845182 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56096C433FE for ; Tue, 10 May 2022 15:35:03 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 0464B1831; Tue, 10 May 2022 17:34:11 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 0464B1831 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196901; bh=IEFQ4uu4doLwCszEybaGPuLWzh4l9a1rfb+746ODxRU=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=BPjhGL6SWABd0rFux+02iLybgmkAz96zeK3qa4yU2IQatM+aKR4O2D47g4bRmYsjh /DVxzRASqJLRSI4Jmm8tXwVlUEebmfc/kf0mgdtWp2whLECxtwW8Pm0DPazDRuSj61 TuRhf51aUx3/khmW5VrYHdCvBYdF0PgCI7incL9Q= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 70E31F80508; Tue, 10 May 2022 17:33:33 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3F3B5F804FF; Tue, 10 May 2022 17:33:31 +0200 (CEST) Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id AFE25F804FF for ; Tue, 10 May 2022 17:33:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz AFE25F804FF Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hlIhyjXW" Received: by mail-pl1-x62c.google.com with SMTP id q18so4123684pln.12 for ; Tue, 10 May 2022 08:33:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=eag9/N12Mu3KYJJ0B0WDBdKQD2EGzDc2Cj2dmt69sIg=; b=hlIhyjXWWaS429dekFzsxpoSrs74VJmufWGmWV5tWMWylXvaSzSNiV8KwCOJCJl/ms 5lbySympGAvbFfBejHNe6TUiO8nLo944xo9TetryJDHFoNW1CJ6DqnyFORYry4nd86QB OtqaS3H4VNJoR7k1pLVLtc46D3wHeTIp50VOuCZdQYksAwdjKdu1uddenfl+8+/oe0nK YfCSxtVHXQDP1BZMTP4/zxV3ObVeZkmYfe9kmg43VpNd9v2sdxTyCDMWMCSqhP8jUk1F +FvfwoIdU0wwxnS9G8SWQNXjAjVvpDfTRT/2ZApNxpAAdnWZIkEsAyiM5DMReiwzC8we 8lbQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=eag9/N12Mu3KYJJ0B0WDBdKQD2EGzDc2Cj2dmt69sIg=; b=IOjZ19HjXJt5PeSiz0fdHfwrkxiPNoqaPEKI/2LFIo05HSQ2g0yZMlECbYRsjGHBbR J13zG9ej92h5zxj3kOLfOmQHl+95so8LL4/DLCUUSyi3rpdxsA/3RqXjCPnv7cqH1buG Xf0CISYK2O7rarRVM3Aaf3+CsHWaIuPemupyf3YmAHGxgtRtjr5h644qNg+bkygsexWg j615+cSlyxmZYNYlnH/itamzCX4SfC65geeoi4xbZggWOocz5M2WJDONzYfNigD+S4Ls 7fJp9FD7qgJkc7+bmYwujeOoT0pnPy2HOLhJR1DmWsD853ieWX8EZiJm1CpeS3hIqr6x Mr0Q== X-Gm-Message-State: AOAM533LvZUPvs+e1Ndl9pLtGSzhN9By+1QeGMfq0pYr5wVoYe4K9c1m slj48J0PxjVgXunkkNtzwgyXP8C+2952yXc= X-Google-Smtp-Source: ABdhPJxFNiE/WgSKaJPA7RFpU5aiK16uBpllXCpM3cyKm0NYEOM3FXJtOGT7rNWzr+Vz36Pu6iKMpQ== X-Received: by 2002:a17:902:edc7:b0:15b:4196:1957 with SMTP id q7-20020a170902edc700b0015b41961957mr20688090plk.161.1652196806644; Tue, 10 May 2022 08:33:26 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:26 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 2/6] ASoC: cs35l36: Fix the error handling of cs35l36_i2c_probe() Date: Tue, 10 May 2022 23:32:47 +0800 Message-Id: <20220510153251.1741210-3-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The driver should goto label 'err' when failing at regmap_read(). Signed-off-by: Zheyu Ma Acked-by: Charles Keepax --- sound/soc/codecs/cs35l36.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/cs35l36.c b/sound/soc/codecs/cs35l36.c index cc5e80222916..920190daa4d1 100644 --- a/sound/soc/codecs/cs35l36.c +++ b/sound/soc/codecs/cs35l36.c @@ -1803,7 +1803,7 @@ static int cs35l36_i2c_probe(struct i2c_client *i2c_client) if (ret < 0) { dev_err(&i2c_client->dev, "Failed to read otp_id Register %d\n", ret); - return ret; + goto err; } if ((l37_id_reg & CS35L36_OTP_REV_MASK) == CS35L36_OTP_REV_L37) From patchwork Tue May 10 15:32:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845183 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 03C2EC433F5 for ; Tue, 10 May 2022 15:35:10 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 2CC8018BA; Tue, 10 May 2022 17:34:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 2CC8018BA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196909; bh=6YiaQ1CeXTlQscNsDXtuzavEqbdvobXJtY79krsVXU4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=cj0v2YdQvx8je5UGDLpTcXMFx63nL8h8i6LlIGHwpZA6fwrVAoBTCnJUvCNdKClNB kMIZBuO5elWhfCcwEgkumiv1VaALk6DgChvH34zz0D8gHqVNpjPdQ9CKE2w80bKO6C 1fb0nlL0ipR6D9/ry0GJAsxvqVAiy9LFXr4i9hRE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 24F1FF804BD; Tue, 10 May 2022 17:33:46 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 8BE5EF80516; Tue, 10 May 2022 17:33:44 +0200 (CEST) Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1F9F4F804BD for ; Tue, 10 May 2022 17:33:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1F9F4F804BD Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="QvY4Ezq+" Received: by mail-pf1-x435.google.com with SMTP id d25so15246877pfo.10 for ; Tue, 10 May 2022 08:33:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=XUdUcfiagybpsQd1lg5V2fMeg0EXQcI6829QJGv7lks=; b=QvY4Ezq+fW8krO2OWe5Wx3kco/r+crV5eM0nwCM02Ofn4Qg7Qa2uUWgmNMxQvf5GzW 3CzrriRzkyIZP7KTfQXKpPH9KBtIOOG+se2tgtqH2+kiz+C3iWntyhUedg7hWyIz8SVn CR5CehLZ40IueILzP+w0dBR9okD5t4jqeBp1EDIFQ/5nNqsRQGQ8VEAiTzcqzyxV7lYh MVfjVZJGo2NFi/rVHK8xAmFW/go+ywwLx8oT3BCVmYdwYXrhT4+aO9JMjp8b5ZjkemnO MDvf3sHPZt94kiWUkzQ2CB5ZDwFdU1ioPbjUkZBZrd41klzat64x5r/Ow1WM8drWNvBR zffw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=XUdUcfiagybpsQd1lg5V2fMeg0EXQcI6829QJGv7lks=; b=0ZSxHdwK9NtmOx439y3+8+XyJLzn9quLIBjA/vfvyr+sKCew1jVEnfSJYo/iAmI82i 2kbmfxYBIAUu8zpCU9lJnxpb88hYa3DHjD9496huyS8HCXYmMYVwQy3O4Xxrz7mh58Lx Yb6jJUxedC1YpwaDHx21N8sZ9EjEt3ix/PmRBmPDCTZSXTRAyC03GILWbxDD/T9DLSFT gXHrdt7sYAff/zDCJJN5V6DjAgjf/bG6sKUbEWVc8Ztlg9UdD2UJqw1pO+l2rmJaFEuj ojl1Se+keslhJgrLi/2MTMdiDDJG3KMdvzoLDOrRr85iW2DCzR+twNpcEZsJSeUmrlFk f+7w== X-Gm-Message-State: AOAM531TPxB7g8NMb+7/wQFORqao1XEbAuKpJO4A8nP2CRn+ralIwfR9 ZDAO+2J9hywmHnOd9ZuaJA== X-Google-Smtp-Source: ABdhPJz6N6qu89EDF0qEJaevMwCr86YbRgvjBFpTUFU7LzuQoM3gKa7lp4Q1bFnsxtUTB5NhIbzAfg== X-Received: by 2002:a62:d0c5:0:b0:50d:a467:3cc8 with SMTP id p188-20020a62d0c5000000b0050da4673cc8mr21129069pfg.81.1652196814749; Tue, 10 May 2022 08:33:34 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:34 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 3/6] ASoC: rt5645: Fix the error handling of rt5645_i2c_probe() Date: Tue, 10 May 2022 23:32:48 +0800 Message-Id: <20220510153251.1741210-4-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" After enabling the regulator, The driver should disable the regulator when failing at probing. Signed-off-by: Zheyu Ma --- sound/soc/codecs/rt5645.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 1518eb7e9201..ccdea234a3ba 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3943,7 +3943,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c) ret = PTR_ERR(regmap); dev_err(&i2c->dev, "Failed to allocate temp register map: %d\n", ret); - return ret; + goto err_enable; } /* @@ -3974,7 +3974,7 @@ static int rt5645_i2c_probe(struct i2c_client *i2c) ret = PTR_ERR(rt5645->regmap); dev_err(&i2c->dev, "Failed to allocate register map: %d\n", ret); - return ret; + goto err_enable; } regmap_write(rt5645->regmap, RT5645_RESET, 0); From patchwork Tue May 10 15:32:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845184 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 9E0DBC433EF for ; Tue, 10 May 2022 15:35:35 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id A4E6E18AA; Tue, 10 May 2022 17:34:43 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz A4E6E18AA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196933; bh=ri+sCHH7zR5Qr4NuIo5Bp472x9xeX6cYYhsSDDpwdz4=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vaecp4i3PcZhRVK3iZTA69FvvofCms+BBZ5sLXBeMRXE7vdu0OD8iYCvrxrv9ca/s FTdOjvKFKkLOHCs13g+rnlHN2bPPedHSMHrwakIFvS42oCjhudTHw1jQrG6urix3qU MTEbu43Me8Vrsbfu+6iAgcOzYbOtbNma44Xfh/Kk= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 182DBF80526; Tue, 10 May 2022 17:33:57 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 5D887F8052E; Tue, 10 May 2022 17:33:55 +0200 (CEST) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 7E5F2F801F5 for ; Tue, 10 May 2022 17:33:44 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 7E5F2F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="DjyipPBY" Received: by mail-pf1-x42f.google.com with SMTP id a11so15245467pff.1 for ; Tue, 10 May 2022 08:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=sDdu0AZ+jhN6LtNsF/DsY4tnnS9mzbYgTFP2SBX4foc=; b=DjyipPBYQ6Mz0BJ2YvmmPz0cPF4YSA0a+fMtYgqkJ77LqbIEqTP2yuaOxzXI8J7Puz YzVfttMONRDIJC1uBKKFmiOMdzXhIY9xzklKp1v6OLrinXC4FwDdGdvem9IooJboBvQy GK3dj2Q+gZYRcoEU7Z7AiRFj/wT5y5HMn74dI7mKWcCAPxzbxqc3nUTTc71NsoQZPHgZ jysRaf4Dr0FqZBFsUbvMJw3fhoye8auxXOIELHpDwhvf02EHOeW5Hk0Jq5xfIZZk+ghD 6oQdmho2n+LrTWDfHjY0tktn7MLxE9rfJyCILgySVpSsBEMTM2+WKb/gJpGdMt1NhQz/ LdOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=sDdu0AZ+jhN6LtNsF/DsY4tnnS9mzbYgTFP2SBX4foc=; b=X3GUWLxpd4iZw7eYGh7ijHTDauDdMcWjg2NaMT11fw8QCR7RbLBInzqtzhTqKzBNs4 xiAhjaxT6PZUwdZFBqZsUP72gAtER4TWRlA8lRKPe5xSCD8UtwS2UJZ0Jtbqlj05IUB7 YaDFSWDjSOxlDqsznucwtuISVg7NUpQE/rpL+8zb8RIC8w6QkM0cKTHFzGUPb5NsG1xt AU/ex6bcZwDxdy/B8LJqFUYkcIVTmuqSdrmLKAfAvOcs+Y6Q9zgAwF6qfVXqDRllfXTG gBtVHNjdikjk5QTYs1KPSy3RYlKwCoU7eBx8wvjf+C2iFahzpy2Xb4MwlLHZcJqgp1QZ 5SzA== X-Gm-Message-State: AOAM530hOwH9pWRk9rr3CZ2inGTm5ArD8pAUim+HcNaMTgUti9WgHtt8 Af2Q5g7PmNnQ6Di2ULcKRg== X-Google-Smtp-Source: ABdhPJw4MmnXegA0D1ntyoBvAJlyQNEK5XXB9HZ+vF5ceB7uq8uJuv4AGpKomxKh2ohAEsSAha8rIQ== X-Received: by 2002:a63:fd51:0:b0:3c1:977e:1fed with SMTP id m17-20020a63fd51000000b003c1977e1fedmr16894976pgj.246.1652196822757; Tue, 10 May 2022 08:33:42 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:42 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 4/6] ASoC: tas571x: Fix the error handling of tas571x_i2c_probe() Date: Tue, 10 May 2022 23:32:49 +0800 Message-Id: <20220510153251.1741210-5-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" After enabling the regulator, The driver should disable the regulator when failing at probing. Signed-off-by: Zheyu Ma --- sound/soc/codecs/tas571x.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas571x.c b/sound/soc/codecs/tas571x.c index dd289774efb2..7b599664db20 100644 --- a/sound/soc/codecs/tas571x.c +++ b/sound/soc/codecs/tas571x.c @@ -833,7 +833,8 @@ static int tas571x_i2c_probe(struct i2c_client *client) if (IS_ERR(priv->pdn_gpio)) { dev_err(dev, "error requesting pdn_gpio: %ld\n", PTR_ERR(priv->pdn_gpio)); - return PTR_ERR(priv->pdn_gpio); + ret = PTR_ERR(priv->pdn_gpio); + goto disable_regs; } priv->reset_gpio = devm_gpiod_get_optional(dev, "reset", @@ -841,7 +842,8 @@ static int tas571x_i2c_probe(struct i2c_client *client) if (IS_ERR(priv->reset_gpio)) { dev_err(dev, "error requesting reset_gpio: %ld\n", PTR_ERR(priv->reset_gpio)); - return PTR_ERR(priv->reset_gpio); + ret = PTR_ERR(priv->reset_gpio); + goto disable_regs; } else if (priv->reset_gpio) { /* pulse the active low reset line for ~100us */ usleep_range(100, 200); From patchwork Tue May 10 15:32:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845185 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CAA59C433FE for ; Tue, 10 May 2022 15:35:49 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id E3C1318FB; Tue, 10 May 2022 17:34:57 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz E3C1318FB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196948; bh=lXswoZcQoN2RRxktDbC04Xk/2TpTkf+VT659R/72U1o=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=g2ojTqVcrU3XoqUv7e/3f4Nbf7gt561xoI3Ibo4Cjbtd/RELbKx7rFAfwok5L32Ll sBL0pmU0WykrHuHP3/6cBvMuals/aWZb0IjdgVGMhrG0rgIJArvsWwj5cOLj/X2dHm Zef+EOSWBuuEUqY9tqQd01QUzDB6b0QTArB8lwGE= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 9BC26F80533; Tue, 10 May 2022 17:33:58 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 40E63F80526; Tue, 10 May 2022 17:33:56 +0200 (CEST) Received: from mail-pf1-x42f.google.com (mail-pf1-x42f.google.com [IPv6:2607:f8b0:4864:20::42f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 82CDBF80526 for ; Tue, 10 May 2022 17:33:52 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 82CDBF80526 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="oeMMxho2" Received: by mail-pf1-x42f.google.com with SMTP id i24so15234110pfa.7 for ; Tue, 10 May 2022 08:33:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JCXe0wXtApkFt+51sQevrUY9NGf5KMQ0zb0sSdWlRTM=; b=oeMMxho23U1nt4kB5/OiiGKWPW0aBfGIBhekswXi29AXRBPmAKIp1Vccofvqw7Y73R eDkaGyMh1v+OYfQMI5qUgfRDLV28JFQn34l66u4qjN0f8b1NmnL4EqQH1WA1CSO0nV7K iqHI5k+Oh4uvS48sKrApyy3d6jfQgZ1Tee+8Jc/5cNoAfE6CHOHlwA0bj+QJ1r/l2TBf A411E2agO4eedeIefsR+oKvbirwIjb4Cva3U/q7vjMgRY6PvDo5LMwAQzaVCzI41s/bP 9KbaxZ0jt56cMXJnHT5ncSPBJ4yPotcRELk51D/CA+YxLGjWtaB4HFGjr/rMOVa/7U1d 8S7w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JCXe0wXtApkFt+51sQevrUY9NGf5KMQ0zb0sSdWlRTM=; b=NMkZAIlGnX9YTnrIgzd1bqVEn0Iq+m0f5DAHYxQDYXge7TfqANm+l6S+8FgonCw67I ENlgakz9TsOD6mqA9npK18x6Eixdazmqhz+bRvc6Lo9Jk9h7Dw5o+ns0JehRJs5BpuuE QakODNdk0xMLxSMn77sFZ316TMEMtrn3r4uF18TF0jJVrzedJLOppvm8wI8+qy/sQHGY KvTEl/eFctx/hlDdhGW3KBRI0fZsHBSyMhW8e8a+rGqCVz74soOFXjwMKMrkuhbiVCYY nE+iBdF/NPFAP8ribm8Q/wDqPHFtw4ohh8D/yEo/BHYxR8JqGBxygVCz0XInzDTULy3e 8Iyg== X-Gm-Message-State: AOAM531vW3Ggw7qfpSSry8QDwj3lDUw+LA+TxKwAtyeqOJjG6Yr6SsRr xi8Os6aSnxB1xMgbFxVfmA== X-Google-Smtp-Source: ABdhPJymdQLmnMeadu7zJaG6Axddm9eIn3kMd/AHeVLO1r8GTjTSUp0gO0bYjtmy+WK69CiGNo8cjQ== X-Received: by 2002:a65:63d1:0:b0:3c6:25b2:22ba with SMTP id n17-20020a6563d1000000b003c625b222bamr17306825pgv.360.1652196830491; Tue, 10 May 2022 08:33:50 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:50 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 5/6] ASoC: tas6424: Fix the error handling of tas6424_i2c_probe() Date: Tue, 10 May 2022 23:32:50 +0800 Message-Id: <20220510153251.1741210-6-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" After enabling the regulator, The driver should disable the regulator when failing at probing. Signed-off-by: Zheyu Ma --- sound/soc/codecs/tas6424.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/tas6424.c b/sound/soc/codecs/tas6424.c index d87444efed37..22b53856e691 100644 --- a/sound/soc/codecs/tas6424.c +++ b/sound/soc/codecs/tas6424.c @@ -756,7 +756,7 @@ static int tas6424_i2c_probe(struct i2c_client *client) TAS6424_RESET, TAS6424_RESET); if (ret) { dev_err(dev, "unable to reset device: %d\n", ret); - return ret; + goto disable_regs; } INIT_DELAYED_WORK(&tas6424->fault_check_work, tas6424_fault_check_work); @@ -765,10 +765,14 @@ static int tas6424_i2c_probe(struct i2c_client *client) tas6424_dai, ARRAY_SIZE(tas6424_dai)); if (ret < 0) { dev_err(dev, "unable to register codec: %d\n", ret); - return ret; + goto disable_regs; } return 0; + +disable_regs: + regulator_bulk_disable(ARRAY_SIZE(tas6424->supplies), tas6424->supplies); + return ret; } static int tas6424_i2c_remove(struct i2c_client *client) From patchwork Tue May 10 15:32:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zheyu Ma X-Patchwork-Id: 12845186 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8AEBC433F5 for ; Tue, 10 May 2022 15:36:01 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id DED3D17EA; Tue, 10 May 2022 17:35:09 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz DED3D17EA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1652196960; bh=sl838P9+RDepr5Ww3vajBnLTKNXBUtJlImr+gdvjUwM=; h=From:To:Subject:Date:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=sPPCivp7xlqOw+4RhBcaHlc5y6UwXzm0ZR8lv5Z4RSWYqTGLhyOWAoXIA0SsuS9nV lls2fc27W/xlcXjkcBBuj71a4YEjQe5uiWmlLO77okr3vC6WngSnGKr6ag2ZajAGni pbY2E5X6sIWTzvHtqXid0KD3OAzj3WsQyzpGiba4= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 34914F80535; Tue, 10 May 2022 17:34:05 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 690B1F80538; Tue, 10 May 2022 17:34:03 +0200 (CEST) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D1566F80536 for ; Tue, 10 May 2022 17:33:59 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D1566F80536 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="RDmrB2J1" Received: by mail-pj1-x102d.google.com with SMTP id a15-20020a17090ad80f00b001dc2e23ad84so2309547pjv.4 for ; Tue, 10 May 2022 08:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=/E2oYMHtBAv9GRmZnfohgrg/949ahcguOuaoSrbKbFI=; b=RDmrB2J1ZPEIKprdrdCO4avF6oVrb5+pne/vzaqtN87noNp1Bli0oHQ6wyNpTU5vI1 0SMhWzqr/HweH8BysNB5VTufUNTaKfODRGH5FgOUYQ1X4JaIF/BwdanaQDrV2rglyxPt gIewzpg+83SMO+qXQynhd74vUUH+dm9cIht1XWcryYKFAbDvU8Uilwfs2axnl1zXzElJ NXAYgg1A06xTdfzeiA3A8G57Mz1A8mJIf/qsKD98jkERgTPWi9bW4xtie1blxVu3ulTS 9zMUXo4w1IAjkCcy0283xKmVQIlCE5QKfr5XSqXAddvBxly0Fow8UPJhqaWohu3WG3Qs 30Rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=/E2oYMHtBAv9GRmZnfohgrg/949ahcguOuaoSrbKbFI=; b=f6vvubjMu/IVgk7hpYKOhL/ptTxm3zFtYf8wdMXxTySCitunJWEDm1xLOr/VfSnOF3 8NyUsgEkwVFg5FMx6Cl25GVxa96kxfpMW6qe93CLuM6zbiuls+NBOT/4cCIGQfx2X+8u gt+3m/4NLLG7VjuaPWV3HF8yhSO2+aGTGIsKhy/wbtEckOMsCx6E3d9xtylNZks2IiUB 4jjyA8slIUDml9Vf76aRUj5w8hlVl+x1+kqnggGhG8AVEELEBer2GNiqaUmHwxzfMZ/k ZEh0zRMlyD6uUbwa8WAdfD9/4NyjnqXJAae0fcZYfu06v76Scq16+j7BtGxOWBW7zW5k Z6kg== X-Gm-Message-State: AOAM530baUrgCWwrjs2acBm+s9rtxDzYg2gpBU3au3Br9NGA0yfsPK9g uaV/UPuMG8B1G+l2qfWFvg== X-Google-Smtp-Source: ABdhPJy9vXUe8rOvHkj/a1GsFzkDy1LxLZuiQxGOh9KaM/XcRQNRmQ/qpQDd7DGC190YEyfTcsaVTA== X-Received: by 2002:a17:90b:4f41:b0:1de:bd14:7721 with SMTP id pj1-20020a17090b4f4100b001debd147721mr149484pjb.9.1652196838221; Tue, 10 May 2022 08:33:58 -0700 (PDT) Received: from localhost.localdomain ([144.202.91.207]) by smtp.gmail.com with ESMTPSA id cd10-20020a056a00420a00b0050dc76281d0sm11104248pfb.170.2022.05.10.08.33.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 10 May 2022 08:33:57 -0700 (PDT) From: Zheyu Ma To: james.schulman@cirrus.com, david.rhodes@cirrus.com, tanureal@opensource.cirrus.com, rf@opensource.cirrus.com, lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, oder_chiou@realtek.com Subject: [PATCH 6/6] ASoC: wm8903: Fix the error handling of wm8903_i2c_probe() Date: Tue, 10 May 2022 23:32:51 +0800 Message-Id: <20220510153251.1741210-7-zheyuma97@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220510153251.1741210-1-zheyuma97@gmail.com> References: <20220510153251.1741210-1-zheyuma97@gmail.com> MIME-Version: 1.0 Cc: patches@opensource.cirrus.com, alsa-devel@alsa-project.org, Zheyu Ma , linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" The driver should goto label 'err' when failing to request the irq. Signed-off-by: Zheyu Ma Acked-by: Charles Keepax --- sound/soc/codecs/wm8903.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sound/soc/codecs/wm8903.c b/sound/soc/codecs/wm8903.c index ddcef11dce7c..3c95c2aea515 100644 --- a/sound/soc/codecs/wm8903.c +++ b/sound/soc/codecs/wm8903.c @@ -2131,7 +2131,7 @@ static int wm8903_i2c_probe(struct i2c_client *i2c) if (ret != 0) { dev_err(wm8903->dev, "Failed to request IRQ: %d\n", ret); - return ret; + goto err; } /* Enable write sequencer interrupts */