From patchwork Fri Oct 18 09:07:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniil Dulov X-Patchwork-Id: 837322 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 61698D0E6C8 for ; Mon, 21 Oct 2024 08:15:02 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 77FFDB70; Mon, 21 Oct 2024 10:14:50 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 77FFDB70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1729498500; bh=TT/Z8roXUv+CIl4XMwPuOonF5RLHtqCyRlLckPzMurs=; h=From:To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=dZbmT7K5XXlupOBl2LgT+P7PFDtWSilI8xHYmzmusKw6ZdVEfIYhvuNMoJNdRNRyU Jl+Di7ARYN6Aus6hxOy4Zj51uSamGkQFbwyAcQpr9dBW9+v2zUl5c76dlqJ6VWz+Yc OK8muZ3AnMzNC130O6xAAeA3pSxgqikLDfPw6nK8= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 38C56F8063D; Mon, 21 Oct 2024 10:13:44 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id B789CF8064C; Mon, 21 Oct 2024 10:13:43 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 68822F80448; Fri, 18 Oct 2024 11:08:00 +0200 (CEST) Received: from mail-out.aladdin-rd.ru (mail-out.aladdin-rd.ru [91.199.251.16]) (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 6D913F80149 for ; Fri, 18 Oct 2024 11:07:58 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 6D913F80149 From: Daniil Dulov To: , Greg Kroah-Hartman CC: Daniil Dulov , Vinod Koul , Bard Liao , Pierre-Louis Bossart , Sanyog Kale , , , , Richard Fitzgerald Subject: [PATCH 5.10 1/1] soundwire: cadence: Fix error check in cdns_xfer_msg() Date: Fri, 18 Oct 2024 12:07:14 +0300 Message-ID: <20241018090714.399076-2-d.dulov@aladdin.ru> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241018090714.399076-1-d.dulov@aladdin.ru> References: <20241018090714.399076-1-d.dulov@aladdin.ru> MIME-Version: 1.0 X-Originating-IP: [10.0.20.125] X-ClientProxiedBy: EXCH-2016-03.aladdin.ru (192.168.1.103) To EXCH-2016-02.aladdin.ru (192.168.1.102) X-MailFrom: D.Dulov@aladdin.ru X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1 Message-ID-Hash: 7BXUHGCFZAQAGLIRODF6ACJB6S5NED6H X-Message-ID-Hash: 7BXUHGCFZAQAGLIRODF6ACJB6S5NED6H X-Mailman-Approved-At: Mon, 21 Oct 2024 08:13:23 +0000 X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Richard Fitzgerald commit 7f6bad4dfde0ec1d479fdcbbb62bccdbf3a93bb4 upstream. _cdns_xfer_msg() returns an sdw_command_response value, not a negative error code. Signed-off-by: Richard Fitzgerald Reviewed-by: Pierre-Louis Bossart Link: https://lore.kernel.org/r/20220917154822.690472-1-rf@opensource.cirrus.com Signed-off-by: Vinod Koul Signed-off-by: Daniil Dulov --- drivers/soundwire/cadence_master.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/soundwire/cadence_master.c b/drivers/soundwire/cadence_master.c index d3e9cd3faadf..2492250ad1bd 100644 --- a/drivers/soundwire/cadence_master.c +++ b/drivers/soundwire/cadence_master.c @@ -692,7 +692,7 @@ cdns_xfer_msg(struct sdw_bus *bus, struct sdw_msg *msg) for (i = 0; i < msg->len / CDNS_MCP_CMD_LEN; i++) { ret = _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN, CDNS_MCP_CMD_LEN, false); - if (ret < 0) + if (ret != SDW_CMD_OK) goto exit; }