From nobody Tue Nov 26 11:48:19 2024 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 smtp.subspace.kernel.org (Postfix) with ESMTPS id 495B25674E; Fri, 18 Oct 2024 09:07:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.199.251.16 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729242484; cv=none; b=d6mg+na+XATlkqSp9avCCNU40LacLWaGj/mtMif8LmOg6iebL1dWra5Uw3sAhO80H/Ki4NuCHWKmEDTtOvhPpJp086UON/3KpLDaaSPJXAFC0hnBfRznkL+GPDvzUKph9Rr+GRMyWmT6rI8hEh/qW6eQSJG1Dfkg/UpNRZ0aVhk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729242484; c=relaxed/simple; bh=TT/Z8roXUv+CIl4XMwPuOonF5RLHtqCyRlLckPzMurs=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=B27DNdBcyL+39IRmvjjTs5EFPt+vUAaWGzQ96vc17tM1eMiNOrK/zhy2Lmvm+eHvdUbgjUNhO6oTVjk4xarnRZ7zzen8bzHh2OSEqZLq9HEbjmM5NjRm3GhUObBvUwxYICtMVEBcYyr9GJtHe5+0lK5aNumGqA/iKDuS6tYExNc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru; spf=pass smtp.mailfrom=aladdin.ru; arc=none smtp.client-ip=91.199.251.16 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=aladdin.ru Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=aladdin.ru 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> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: EXCH-2016-03.aladdin.ru (192.168.1.103) To EXCH-2016-02.aladdin.ru (192.168.1.102) Content-Type: text/plain; charset="utf-8" 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.cirru= s.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 =3D 0; i < msg->len / CDNS_MCP_CMD_LEN; i++) { ret =3D _cdns_xfer_msg(cdns, msg, cmd, i * CDNS_MCP_CMD_LEN, CDNS_MCP_CMD_LEN, false); - if (ret < 0) + if (ret !=3D SDW_CMD_OK) goto exit; } =20 --=20 2.25.1