From: Greg KH <gregkh@linuxfoundation.org>
To: Su Hui <suhui@nfschina.com>
Cc: tomas.winkler@intel.com, arnd@arndb.de, nathan@kernel.org,
ndesaulniers@google.com, trix@redhat.com,
alexander.usyskin@intel.com, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] misc: mei: client.c: fix some error code problem in mei_cl_write
Date: Mon, 20 Nov 2023 10:14:38 +0100 [thread overview]
Message-ID: <2023112010-ceremony-salad-145b@gregkh> (raw)
In-Reply-To: <20231120085343.157381-1-suhui@nfschina.com>
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@nfschina.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?
thanks,
greg k-h
next prev parent reply other threads:[~2023-11-20 9:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-20 8:53 [PATCH] misc: mei: client.c: fix some error code problem in mei_cl_write Su Hui
2023-11-20 9:14 ` Greg KH [this message]
2023-11-20 9:28 ` Su Hui
2023-11-20 15:03 ` Dan Carpenter
2023-11-22 3:06 ` Su Hui
2023-11-27 7:10 ` Usyskin, Alexander
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2023112010-ceremony-salad-145b@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=alexander.usyskin@intel.com \
--cc=arnd@arndb.de \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=nathan@kernel.org \
--cc=ndesaulniers@google.com \
--cc=suhui@nfschina.com \
--cc=tomas.winkler@intel.com \
--cc=trix@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox