Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp4617523pxj; Wed, 12 May 2021 09:20:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwT6pPrxH/hqqruiV0F9rogvuwy/i/70NBPKTDffZ+lWxA6ybbmxB43+ZTP6vwCCj+j3N/l X-Received: by 2002:ac2:569e:: with SMTP id 30mr21046864lfr.380.1620836406175; Wed, 12 May 2021 09:20:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620836406; cv=none; d=google.com; s=arc-20160816; b=KpEdS4GWNJSxA9+5bLOf25ebNuQe+fj1Adml7b1R1sRM7Rxba96FR29t/OitlKJtmP HAyoY9kRbvYiSRaSZT0B+NvmlFpUqi3ihJzlv355dnmiUo612obE3DOpSQ/41DFRRAfz Myh6traReT/Q6trrZ+Iv4gUXBhb0XUvnFqLZgHzi1BVQvfTuQbkpigWeNjfHtUt+shZr xhGNiz4ez96qgjujydNeVL6xIKSP355wqzjfdmIHJliY0bgzBfiRKspwaOPdPe/9nmc9 d5PUDPnlnR8KoXj3u/4zepvAcZuafz9McF1JkA58v0tzOuzdrBKLnSGfchOsecr82OW1 6dOg== 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=TEshLxluR0jNbS849Nl5H6WqzmnDI+W2I7wIXXiaKI8=; b=buy5JCgzneNB74TlFpSvUGQvr94Zyi3je65bOnX7NUIYZ6H4zaPyDCmNuVXTIsNIIt pJ8yJbq52fnK3X+2ecdK+4hO0b7ngpjrsxUWoyPOs1SLVoEw6UZG+xNO1FsJDTLxzdAe 1+s/5DR4eps+rozljuduuniyhiJvpJOkkMvj9/9sks9OVwK/ZEM2JkLTtLUdyUq5q+yN +AF73DrPRKPGZX3V2nt6SgrzfNSWcgACxmE9h6U13PgvG7zQUYJf5xzLZd9BOZmZlv4W cl/BMxX93ZrDBAV5XjHcA0zsL3v4hGsYWGO86nuhY0dIW1frXHd0l7zm8jyItuznzUqf uIKQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PyqNbZWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n13si452113lfi.465.2021.05.12.09.19.35; Wed, 12 May 2021 09:20:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=PyqNbZWE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S239892AbhELQQQ (ORCPT + 99 others); Wed, 12 May 2021 12:16:16 -0400 Received: from mail.kernel.org ([198.145.29.99]:48842 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234523AbhELPdG (ORCPT ); Wed, 12 May 2021 11:33:06 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id EC96B6197C; Wed, 12 May 2021 15:16:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1620832610; bh=vFwL//8IAML3PrJBbsuFnqiU1cS8K89YUhP45vQsHaI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PyqNbZWELHhoDVg1E5zvcXBkI8Kwc5JK6LTqxUk2/Qb5dqR4GRY7+1BZEUBKc5nAh dYjQDgfZhf6uu8G/1/SR7ahrRslExagri+MZJjrq3sd0e7gMMtIx7smjgyzM9a2evp jqOqdz46wYLClE4vpCTC+HHfQjerRjRxcpmIOLNg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Colin Ian King , Pierre-Louis Bossart , Mark Brown , Sasha Levin Subject: [PATCH 5.10 350/530] ASoC: Intel: boards: sof-wm8804: add check for PLL setting Date: Wed, 12 May 2021 16:47:40 +0200 Message-Id: <20210512144831.285651293@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210512144819.664462530@linuxfoundation.org> References: <20210512144819.664462530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Colin Ian King [ Upstream commit 1730ef62874dbdc53dc2abfa430f09f0b304bafc ] Currently the return from snd_soc_dai_set_pll is not checking for failure, this is the only driver in the kernel that ignores this, so it probably should be added for sake of completeness. Fix this by adding an error return check. Addresses-Coverity: ("Unchecked return value") Fixes: f139546fb7d4 ("ASoC: Intel: boards: sof-wm8804: support for Hifiberry Digiplus boards") Signed-off-by: Colin Ian King Acked-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20210226185653.1071321-1-colin.king@canonical.com Signed-off-by: Mark Brown Signed-off-by: Sasha Levin --- sound/soc/intel/boards/sof_wm8804.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sound/soc/intel/boards/sof_wm8804.c b/sound/soc/intel/boards/sof_wm8804.c index a46ba13e8eb0..6a181e45143d 100644 --- a/sound/soc/intel/boards/sof_wm8804.c +++ b/sound/soc/intel/boards/sof_wm8804.c @@ -124,7 +124,11 @@ static int sof_wm8804_hw_params(struct snd_pcm_substream *substream, } snd_soc_dai_set_clkdiv(codec_dai, WM8804_MCLK_DIV, mclk_div); - snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); + ret = snd_soc_dai_set_pll(codec_dai, 0, 0, sysclk, mclk_freq); + if (ret < 0) { + dev_err(rtd->card->dev, "Failed to set WM8804 PLL\n"); + return ret; + } ret = snd_soc_dai_set_sysclk(codec_dai, WM8804_TX_CLKSRC_PLL, sysclk, SND_SOC_CLOCK_OUT); -- 2.30.2