Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 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>

authored by

Su Hui and committed by
Greg Kroah-Hartman
ee623602 8f06aee8

+1 -1
+1 -1
drivers/misc/mei/client.c
··· 2032 2032 2033 2033 hbuf_slots = mei_hbuf_empty_slots(dev); 2034 2034 if (hbuf_slots < 0) { 2035 - rets = -EOVERFLOW; 2035 + buf_len = -EOVERFLOW; 2036 2036 goto out; 2037 2037 } 2038 2038