diff options
author | Su Hui <suhui@nfschina.com> | 2023-11-20 17:55:26 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-12-13 18:45:29 +0100 |
commit | f78fff4648bb0a797359dac69792463efd22bb00 (patch) | |
tree | 6073a711ac38629c76bfd51b21615fd102534ade | |
parent | e2365ead012a811755c4e3c02a95c70b89b38e56 (diff) | |
download | linux-starfive-f78fff4648bb0a797359dac69792463efd22bb00.tar.gz linux-starfive-f78fff4648bb0a797359dac69792463efd22bb00.tar.bz2 linux-starfive-f78fff4648bb0a797359dac69792463efd22bb00.zip |
misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
[ Upstream commit ee6236027218f8531916f1c5caa5dc330379f287 ]
Clang static analyzer complains that value stored to 'rets' is never
read.Let 'buf_len = -EOVERFLOW' to make sure we can return '-EOVERFLOW'.
Fixes: 8c8d964ce90f ("mei: move hbuf_depth from the mei device to the hw modules")
Signed-off-by: Su Hui <suhui@nfschina.com>
Link: https://lore.kernel.org/r/20231120095523.178385-2-suhui@nfschina.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r-- | drivers/misc/mei/client.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 75bc2a32ec0d..32f228782318 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -2032,7 +2032,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time hbuf_slots = mei_hbuf_empty_slots(dev); if (hbuf_slots < 0) { - rets = -EOVERFLOW; + buf_len = -EOVERFLOW; goto out; } |