Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp1715668ybg; Sat, 19 Oct 2019 00:58:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwSdQmezJyMUXNkgYtDoWGZG+NLU/tV2PMRC9F9K2U27gbogzxWoV36zy6hDHnVLw/IgtUp X-Received: by 2002:a05:6402:1b91:: with SMTP id cc17mr13806235edb.180.1571471882961; Sat, 19 Oct 2019 00:58:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571471882; cv=none; d=google.com; s=arc-20160816; b=YUMR0cM41leWTGWlVCMk/pk9FFa5jZULmrxD+qHHKfcdcKqbcAuoXKHUOiIxIo+Jvz JIyy+brHF285gQ7xeSMhYHfPxwBWgrKxZHDjd4LwPXDAnPTJM5MvMtpDFqGXxvRotrmr Kc8PvTnFiudUg8DLtUOPCo6GWo3rPtEx9JQV+sfs1nrDciKDvCUL63dYdT5yxLm3r660 M90Ti2sUlXFzDyjKucnOjp8UgmFqNrL5QIq6EhJ6SmwMQXoy0vRxcl6yFLsrMJaqH0VJ ngzMMdikueoELbyY06Y40ype6eIFieuUBRtu02huvg2TSMaLXCRTq8buFG2B6XcvRDO+ BkyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:content-transfer-encoding:mime-version :message-id:date:subject:cc:from:dkim-signature; bh=uiSq7qeFYNBf+B+hvyqTL3DKogK+/9GgP2nnW/iTdJQ=; b=tkPMONvWZ7xgORYJOlAjS0JgnDqaNx5j/xQCZO6WXO+Hdehgj1yKHzlv1AvIcpZ4S2 HYIUdndWgAYE0ZovfR637/Pq4VxnwCQEWWdJ044HZMkpr3HWymAsGW5kEPt7Jg/EK+4G ELGr3gp7idDuNWtYg2qHDg0GbxkHbj+qm4sgnGEAtBTteMTUcVBSKssKwuOTqxxGcVPH oswi9KkF7XbQTnUCU92b+S2acgSZFmN4fOFuVdm/xsUVejdKZnBhaL6xmrEXarAaugQV c+/mjC/SUorBg01hlPo1Cc+x4FenOuTIz+X4EytJ6kN9ytaOcqcIICBljO7k20DELhAX GO6Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=m8ChvJlM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h14si6600532edk.315.2019.10.19.00.57.39; Sat, 19 Oct 2019 00:58:02 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=m8ChvJlM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2437557AbfJRIPU (ORCPT + 99 others); Fri, 18 Oct 2019 04:15:20 -0400 Received: from mail-pf1-f195.google.com ([209.85.210.195]:35040 "EHLO mail-pf1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731008AbfJRIPU (ORCPT ); Fri, 18 Oct 2019 04:15:20 -0400 Received: by mail-pf1-f195.google.com with SMTP id 205so3399820pfw.2 for ; Fri, 18 Oct 2019 01:15:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uiSq7qeFYNBf+B+hvyqTL3DKogK+/9GgP2nnW/iTdJQ=; b=m8ChvJlMrxPv5W8hkfPBg5heCY/fbqHBiTpBTRP3b/WNHPtpzvGVHF5e5f+wCXWtss rZ1oxTtWrm/r15UOlkNpO/Yqi/nCcSaE2vTYRRFdUC8JUJ41R/RMgiFAjcLWBCqEbW9q qS42/w5YDBEf/LJhPrwB2VBrQ+9h14+tjCMHcLSDVYDQMqSL3UgXqMMyZBs1qlykOUsc lfTRNrLm4lw9MuG7v0032yGm+EBoRPQKCtWlZl/hGfg239A/o9eQM3nFqAWK6hikKnEL KTnTPx67BNmIYewuXrz8Ersk3DU4QMpbXM+tbPjrxcAJOQ5BmYx9UzQ+ggM0VZHREvj3 TC4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=uiSq7qeFYNBf+B+hvyqTL3DKogK+/9GgP2nnW/iTdJQ=; b=Wo1Qnzf45rIVzOA9Ln9OAUexkYpU2VOE1x76LWZLnlXo9xehWB50cwCTBG/BDRFqLV 3j4J0TI01HqEqm+T8dSMtmy7iNTFKiAXtvDrFgpbXSInMf1xTVKRZg/KkNU3hfeeUmBc eRtyjqMxwa22KKzCuJi+npUseYz9RDvNSOIoXljz/ba/cna1c/Y4ZHxCFQgyVF2hHQw2 Q7PcT71HBX6NAJAWJ5JcVxXiWZeKYq86ISjk0iz3hrTGW9OwHT+RMWr5DWdAAdF76180 jc4SKqxXSfoYp7QlWXbTvqe+16vM0ZGga6JKzNemGih+N7t99EqvGAgn0xoOqa+EO014 pklw== X-Gm-Message-State: APjAAAXFKvp78h/bfQXGH1Llc6LAEoypXJqj0bjBI6Kk7IZY+g2hCUuz kdiUOV0EUXEmnfNw1jXmW5c= X-Received: by 2002:aa7:9472:: with SMTP id t18mr5105603pfq.261.1571386519409; Fri, 18 Oct 2019 01:15:19 -0700 (PDT) Received: from suzukaze.ipads-lab.se.sjtu.edu.cn ([89.31.126.54]) by smtp.gmail.com with ESMTPSA id z12sm5688656pfj.41.2019.10.18.01.15.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Oct 2019 01:15:18 -0700 (PDT) From: Chuhong Yuan Cc: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Chuhong Yuan Subject: [PATCH] ASoC: tlv320aic32x4: add a check for devm_clk_get Date: Fri, 18 Oct 2019 16:14:49 +0800 Message-Id: <20191018081448.8486-1-hslester96@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit To: unlisted-recipients:; (no To-header on input) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org aic32x4_set_dai_sysclk misses a check for devm_clk_get and may miss the failure. Add a check to fix it. Signed-off-by: Chuhong Yuan --- sound/soc/codecs/tlv320aic32x4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/codecs/tlv320aic32x4.c b/sound/soc/codecs/tlv320aic32x4.c index 68165de1c8de..b4e9a6c73f90 100644 --- a/sound/soc/codecs/tlv320aic32x4.c +++ b/sound/soc/codecs/tlv320aic32x4.c @@ -573,6 +573,9 @@ static int aic32x4_set_dai_sysclk(struct snd_soc_dai *codec_dai, struct clk *pll; pll = devm_clk_get(component->dev, "pll"); + if (IS_ERR(pll)) + return PTR_ERR(pll); + mclk = clk_get_parent(pll); return clk_set_rate(mclk, freq); -- 2.20.1