From: Greg KH <gregkh@linuxfoundation.org>
To: Saurav Girepunje <saurav.girepunje@gmail.com>
Cc: devel@driverdev.osuosl.org, elder@kernel.org, vireshk@kernel.org,
johan@kernel.org, linux-kernel@vger.kernel.org,
greybus-dev@lists.linaro.org, saurav.girepunje@hotmail.com
Subject: Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced.
Date: Sun, 26 Jan 2020 19:30:34 +0100 [thread overview]
Message-ID: <20200126183034.GA4086664@kroah.com> (raw)
In-Reply-To: <20200126083130.GA17725@google.com>
On Sun, Jan 26, 2020 at 02:01:30PM +0530, Saurav Girepunje wrote:
> Fix the warning reported by cocci check.
What is "cocci check"?
> Changes:
>
Why add that line?
> In queue_work fw dereference before it actually get assigned.
> move queue_work before gb_bootrom_set_timeout.
>
> As gb_bootrom_get_firmware () return NEXT_REQ_READY_TO_BOOT
> only when there is no error and offset + size is actually equal
> to fw->size. So initialized next_request to NEXT_REQ_GET_FIRMWARE
> for return in other case.
>
> Signed-off-by: Saurav Girepunje <saurav.girepunje@gmail.com>
> ---
> drivers/staging/greybus/bootrom.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
As Johan said, there are a lot of really bad "static checking"
tools out there that can not properly parse C code. Always verify by
hand what the tools said is wrong, really is an issue before sending a
patch out for something that is not correct. This looks like you need
to use a better tool.
greg k-h
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
next prev parent reply other threads:[~2020-01-26 18:30 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-26 8:31 [PATCH] staging: greybus: fix fw is NULL but dereferenced Saurav Girepunje
2020-01-26 11:04 ` Johan Hovold
2020-01-26 18:30 ` Greg KH [this message]
2021-03-25 10:19 Jian Dong
2021-03-25 10:29 ` Greg KH
2021-03-25 11:03 ` Jian Dong
2021-03-25 11:32 ` Greg KH
2021-03-25 10:50 ` Dan Carpenter
2021-03-25 10:51 ` Viresh Kumar
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=20200126183034.GA4086664@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=devel@driverdev.osuosl.org \
--cc=elder@kernel.org \
--cc=greybus-dev@lists.linaro.org \
--cc=johan@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=saurav.girepunje@gmail.com \
--cc=saurav.girepunje@hotmail.com \
--cc=vireshk@kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).