[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5c98fc07-36a9-92cc-f8d6-c4efdc0c34aa@nfschina.com>
Date: Mon, 20 Nov 2023 17:28:30 +0800
From: Su Hui <suhui@...china.com>
To: Greg KH <gregkh@...uxfoundation.org>
Cc: tomas.winkler@...el.com, arnd@...db.de, nathan@...nel.org,
ndesaulniers@...gle.com, trix@...hat.com,
alexander.usyskin@...el.com, linux-kernel@...r.kernel.org,
llvm@...ts.linux.dev, kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] misc: mei: client.c: fix some error code problem in
mei_cl_write
On 2023/11/20 17:14, Greg KH wrote:
> On Mon, Nov 20, 2023 at 04:53:45PM +0800, Su Hui wrote:
>> Clang static analyzer complains that value stored to 'rets' is never
>> read. Remove some useless code, and let 'buf_len = -EOVERFLOW' to make
>> sure we can return '-EOVERFLOW'.
>>
>> mei_msg_hdr_init() return negative error code, rets should be
>> 'PTR_ERR(mei_hdr)' rather than '-PTR_ERR(mei_hdr)'.
>>
>> Fixes: 0cd7c01a60f8 ("mei: add support for mei extended header.")
>> Fixes: 8c8d964ce90f ("mei: move hbuf_depth from the mei device to the hw modules")
>> Signed-off-by: Su Hui <suhui@...china.com>
>> ---
>> drivers/misc/mei/client.c | 6 ++----
>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c
>> index 9c8fc87938a7..00dac0a47da0 100644
>> --- a/drivers/misc/mei/client.c
>> +++ b/drivers/misc/mei/client.c
>> @@ -2011,7 +2011,7 @@ ssize_t mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, unsigned long time
>>
>> mei_hdr = mei_msg_hdr_init(cb);
>> if (IS_ERR(mei_hdr)) {
>> - rets = -PTR_ERR(mei_hdr);
>> + rets = PTR_ERR(mei_hdr);
> This looks like a bugfix, while the other changes here are just a normal
> cleanup. Can you please split this up into different patches?
I will split this right now.
Thanks for your suggestion!
Su Hui
>
> thanks,
>
> greg k-h
Powered by blists - more mailing lists