Skip to content

Commit ee62360

Browse files
Su Huigregkh
authored andcommitted
misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write
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]>
1 parent 8f06aee commit ee62360

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
@@ -2032,7 +2032,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
20322032

20332033
hbuf_slots = mei_hbuf_empty_slots(dev);
20342034
if (hbuf_slots < 0) {
2035-
rets = -EOVERFLOW;
2035+
buf_len = -EOVERFLOW;
20362036
goto out;
20372037
}
20382038

0 commit comments

Comments
 (0)