Skip to content

Commit 066dcd8

Browse files
Su Huigregkh
authored andcommitted
misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
[ 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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
1 parent d78789b commit 066dcd8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/misc/mei/client.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2002,7 +2002,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb)
20022002

20032003
hbuf_slots = mei_hbuf_empty_slots(dev);
20042004
if (hbuf_slots < 0) {
2005-
rets = -EOVERFLOW;
2005+
buf_len = -EOVERFLOW;
20062006
goto out;
20072007
}
20082008

0 commit comments

Comments
 (0)