Received: by 2002:a05:7412:f690:b0:e2:908c:2ebd with SMTP id ej16csp891620rdb; Fri, 20 Oct 2023 02:27:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF5vYCZeNGWJ4/JY+0kPAhiu9KS3mN6+ZUVHQiFbSFBeuqCzPMfLicJAQSXhKIOLyoBJDOa X-Received: by 2002:a05:6808:144d:b0:3b2:dcff:9e54 with SMTP id x13-20020a056808144d00b003b2dcff9e54mr1602724oiv.24.1697794034657; Fri, 20 Oct 2023 02:27:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697794034; cv=none; d=google.com; s=arc-20160816; b=JsKiRGgXYoaU7oJuFw7vFcbJt3OpftI5A/pgACxPk8mkm1coTRyTpzw1yrBgL+U+kv IsTL4ztWYmVmKyjcfjKHd5sD2Y/IpoVOTIKYmZDq/796mZ2m1NPzurllv8Ej4ZnLuTP4 LpzjcBwn7HMIGmVxoI7r5HttNvBw2IKyYPNpIQj+g2yt8kyuW8YY1LMo65z01oZKEpC3 Y4pI9Ij20iuYqKiK0lN+AbhTUmJzBLicQ+uggcVCzPeizt8hmTm3ZsmeAFjiSmtlEufE MWB0Wn9cxdlqVH8i4ZQFwygMJmp6wSSZSNhXXE/d0KKM9OXed5B8y7HA2/xzyqAiDb7E UyOw== 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 :message-id:date:subject:cc:to:from; bh=QmKSDnmrrdVX5eSaC+6uoxTmBVej1LUj2xZdFqRJunU=; fh=SxklJqq9FmlYGi5Yys2skQDMq2mSMhrZ5UGehtQ5SM0=; b=0bgaauxvSs2/b0BQQT9qXU3EOse5xXWLr1lrjMAaP99Sm07bSTnLnBNgSWfKa5JbSY 0H+RdwMEtLHRc2onj8RfWN2jMppTIXCzWBhyhjFB1rlMEfzGsvC1gkYrK57N3FelktRa 7x3bhdzwsZKfUjEQEwhwAl2Qo+abp5/ToGqy0x8ZiZHYsJ9lnONEJzh+kxyjv7XTwXF/ 1uL+iOsYZtNvW5M7J1OsqAAq+FkRyTcn9RxLWnSqZZ5lUDgZv24I7YzsVvoDRskGqxZy Xyw5ahtGDWpba8F3yvmGTEob0CofZc7wCsWP2nO1+kthdY4ch5Y9YhNSDlUzvR9/CvOQ GRuA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id j191-20020a638bc8000000b005b422bf48a4si1475575pge.89.2023.10.20.02.27.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Oct 2023 02:27:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 27E9F81C0C3F; Fri, 20 Oct 2023 02:27:12 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1376575AbjJTJ1H (ORCPT + 99 others); Fri, 20 Oct 2023 05:27:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55990 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1376727AbjJTJ04 (ORCPT ); Fri, 20 Oct 2023 05:26:56 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 645C8D67; Fri, 20 Oct 2023 02:26:52 -0700 (PDT) Received: from localhost.localdomain (unknown [180.167.10.98]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 4237E605164A0; Fri, 20 Oct 2023 17:26:29 +0800 (CST) X-MD-Sfrom: suhui@nfschina.com X-MD-SrcIP: 180.167.10.98 From: Su Hui To: cezary.rojewski@intel.com, pierre-louis.bossart@linux.intel.com, liam.r.girdwood@linux.intel.com, peter.ujfalusi@linux.intel.com, yung-chuan.liao@linux.intel.com, ranjani.sridharan@linux.intel.com, kai.vehmanen@linux.intel.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com Cc: Su Hui , zhangyiqun@phytium.com.cn, amadeuszx.slawinski@linux.intel.com, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH] ASoC: Intel: Skylake: add an error code check in skl_pcm_trigger Date: Fri, 20 Oct 2023 17:26:20 +0800 Message-Id: <20231020092619.210520-1-suhui@nfschina.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Fri, 20 Oct 2023 02:27:12 -0700 (PDT) skl_decoupled_trigger() can return error code like -EPIPE if failed, add check for this. Signed-off-by: Su Hui --- sound/soc/intel/skylake/skl-pcm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sound/soc/intel/skylake/skl-pcm.c b/sound/soc/intel/skylake/skl-pcm.c index ac3dc8c63c26..40308501f8bf 100644 --- a/sound/soc/intel/skylake/skl-pcm.c +++ b/sound/soc/intel/skylake/skl-pcm.c @@ -518,6 +518,9 @@ static int skl_pcm_trigger(struct snd_pcm_substream *substream, int cmd, return ret; ret = skl_decoupled_trigger(substream, cmd); + if (ret < 0) + return ret; + if ((cmd == SNDRV_PCM_TRIGGER_SUSPEND) && !w->ignore_suspend) { /* save the dpib and lpib positions */ hstream->dpib = readl(bus->remap_addr + -- 2.30.2