Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp164206pxk; Tue, 1 Sep 2020 19:59:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwaBfLzHy0OTo0we4rj4wh/RDxqzfkeSr3/51Xrfoytx/M9GJaY9HWT/9YpGCym7MAri9Wq X-Received: by 2002:a17:906:36c2:: with SMTP id b2mr4165707ejc.238.1599015567460; Tue, 01 Sep 2020 19:59:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599015567; cv=none; d=google.com; s=arc-20160816; b=g0fJUlzhNeVFW3ERabwGXawAIDhuEmuOH1DtDaveb3EstCaGzEvEty0qJzjj7jVqSU XpNe77dvlTmNNnCn8aSrfM0Jm3NeccndGtN8fAn1mwAZyTT+ZzhfFAGGIpIu7AxYaOM1 UdUhG/txrSMVGl2MGY20VYWJjHZyfMCpqOLIXVegKUdCXDpnZE8LCHk8BuUU6k+FKsdn rfqtbJJTUwcNzMf5l6WKEhmEP3A6Unmo45lXBZ4p3VB7WVE9wnU8MOfChbuajc15OwB0 wlabICejuVXMofGp/7kfornMKSmZaLbJK+nt/NKUjQ5hVScCLvmcRmvN76KWjLeraQX9 gI5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:ironport-sdr:ironport-sdr; bh=eJ6e6jMbSLoxvOurD7nRQdYJo4sOslCjausuoZ5qLT4=; b=yIF7ez/OvA2DEzUeBHxPUqDe4C3fOjGoBB8eYcVRX0xh2B8gitZ24vhi6xI3OYk2iN TxAmxokcqQ5BYLJt241DTJRyKzEzOg4pNotAJqF6AnMFQC1WjC17dKHN3cBXUcFMkM5i vi0jXXugX4kbc8KOpj22rl+HMRKJCbMohtjDE2FTZCaNTdzvnvxQc8COQ1rK45u8fnEC iCmfipnggOi3i6IeOw3wKVX01rfgeuOsyRtxVk5NjAMLn/jtKzP9NSWhDYTBkzzeXLZH LhXkQ5wG5xC+J+Nrqmxi2wr5i7SHhK+/vecp8SCRFVcPlewlevpS6QLN/ZULptYjfpaQ 2JDQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bw23si1773265ejb.334.2020.09.01.19.59.04; Tue, 01 Sep 2020 19:59:27 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726446AbgIBC4f (ORCPT + 99 others); Tue, 1 Sep 2020 22:56:35 -0400 Received: from mga07.intel.com ([134.134.136.100]:49594 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726144AbgIBC4c (ORCPT ); Tue, 1 Sep 2020 22:56:32 -0400 IronPort-SDR: YJ+19yKk0Q948+X6zeHeWT7e5blCEZSJVZEP0rxwxb+rEO0lH8NhpRYUdjMUDOKXgxnplIPUVl nay+jfhnnHDg== X-IronPort-AV: E=McAfee;i="6000,8403,9731"; a="221528367" X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="221528367" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:31 -0700 IronPort-SDR: dBdYWAg0W5Eu+7VeYYI/bPQMqFd37s70fWLRa4KE01QtqXb/S2ViGvAlcPTYsUqcSqieOkE6uZ bMzgToiTgpZQ== X-IronPort-AV: E=Sophos;i="5.76,381,1592895600"; d="scan'208";a="477457257" Received: from bard-ubuntu.sh.intel.com ([10.239.13.33]) by orsmga005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Sep 2020 19:56:27 -0700 From: Bard Liao To: alsa-devel@alsa-project.org, vkoul@kernel.org Cc: vinod.koul@linaro.org, linux-kernel@vger.kernel.org, tiwai@suse.de, broonie@kernel.org, gregkh@linuxfoundation.org, jank@cadence.com, srinivas.kandagatla@linaro.org, rander.wang@linux.intel.com, ranjani.sridharan@linux.intel.com, hui.wang@canonical.com, pierre-louis.bossart@linux.intel.com, sanyog.r.kale@intel.com, mengdong.lin@intel.com, bard.liao@intel.com Subject: [PATCH 2/7] soundwire: stream: fix NULL/IS_ERR confusion Date: Tue, 1 Sep 2020 23:02:35 +0800 Message-Id: <20200901150240.19288-3-yung-chuan.liao@linux.intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> References: <20200901150240.19288-1-yung-chuan.liao@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Pierre-Louis Bossart snd_soc_dai_get_sdw_stream() can only return -ENOTSUPP or the stream, NULL is not a possible value. Fixes: 4550569bd779f ('soundwire: stream: add helper to startup/shutdown streams') Reported-by: Bard Liao Signed-off-by: Pierre-Louis Bossart Reviewed-by: Rander Wang Signed-off-by: Bard Liao --- drivers/soundwire/stream.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/stream.c b/drivers/soundwire/stream.c index 37290a799023..3f54db259f45 100644 --- a/drivers/soundwire/stream.c +++ b/drivers/soundwire/stream.c @@ -1911,7 +1911,7 @@ void sdw_shutdown_stream(void *sdw_substream) sdw_stream = snd_soc_dai_get_sdw_stream(dai, substream->stream); - if (!sdw_stream) { + if (IS_ERR(sdw_stream)) { dev_err(rtd->dev, "no stream found for DAI %s", dai->name); return; } -- 2.17.1