Skip to content

Commit

Permalink
misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
Browse files Browse the repository at this point in the history
[ Upstream commit ee62360 ]

Clang static analyzer complains that value stored to 'rets' is never
read.Let 'buf_len = -EOVERFLOW' to make sure we can return '-EOVERFLOW'.

Fixes: 8c8d964 ("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>
  • Loading branch information
Su Hui authored and gregkh committed Dec 13, 2023
1 parent d78789b commit 066dcd8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/misc/mei/client.c
Original file line number Diff line number Diff line change
Expand Up @@ -2002,7 +2002,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb)

hbuf_slots = mei_hbuf_empty_slots(dev);
if (hbuf_slots < 0) {
rets = -EOVERFLOW;
buf_len = -EOVERFLOW;
goto out;
}

Expand Down

0 comments on commit 066dcd8

Please sign in to comment.