[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250131195639.1784933-2-ftreven@opensource.cirrus.com>
Date: Fri, 31 Jan 2025 13:56:32 -0600
From: Fred Treven <ftreven@...nsource.cirrus.com>
To: Simon Trimmer <simont@...nsource.cirrus.com>,
Charles Keepax
<ckeepax@...nsource.cirrus.com>,
Richard Fitzgerald
<rf@...nsource.cirrus.com>
CC: Fred Treven <ftreven@...nsource.cirrus.com>,
<patches@...nsource.cirrus.com>, <linux-kernel@...r.kernel.org>
Subject: [PATCH 1/7] firmware: cs_dsp: Fix error checking in wseq_write()
cs_dsp_coeff_write_ctrl() may return a non-zero value (1)
upon success. Change error checking in the write sequencer
code such that it checks for negative errnos rather than
any non-zero value when using this function.
Signed-off-by: Fred Treven <ftreven@...nsource.cirrus.com>
---
drivers/firmware/cirrus/cs_dsp.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/firmware/cirrus/cs_dsp.c b/drivers/firmware/cirrus/cs_dsp.c
index 5365e9a43000..56315b0b5583 100644
--- a/drivers/firmware/cirrus/cs_dsp.c
+++ b/drivers/firmware/cirrus/cs_dsp.c
@@ -3702,7 +3702,7 @@ int cs_dsp_wseq_write(struct cs_dsp *dsp, struct cs_dsp_wseq *wseq,
ret = cs_dsp_coeff_write_ctrl(wseq->ctl, op_end->offset / sizeof(u32),
&op_end->data, sizeof(u32));
- if (ret)
+ if (ret < 0)
goto op_new_free;
list_add_tail(&op_new->list, &op_end->list);
@@ -3710,7 +3710,7 @@ int cs_dsp_wseq_write(struct cs_dsp *dsp, struct cs_dsp_wseq *wseq,
ret = cs_dsp_coeff_write_ctrl(wseq->ctl, op_new->offset / sizeof(u32),
words, new_op_size);
- if (ret)
+ if (ret < 0)
goto op_new_free;
return 0;
--
2.34.1
Powered by blists - more mailing lists