On Thu, Mar 25, 2021 at 07:03:39PM +0800, Jian Dong wrote:
> On Thu, 25 Mar 2021 11:29:06 +0100
> Greg KH wrote:
>
> > On Thu, Mar 25, 2021 at 06:19:26PM +0800, Jian Dong wrote:
> > > From: Jian Dong
> > >
> > > fixes coccicheck Error:
> > >
> > > drivers/staging/greybus/bootrom.c:301:41-45:
On Thu, 25 Mar 2021 11:29:06 +0100
Greg KH wrote:
> On Thu, Mar 25, 2021 at 06:19:26PM +0800, Jian Dong wrote:
> > From: Jian Dong
> >
> > fixes coccicheck Error:
> >
> > drivers/staging/greybus/bootrom.c:301:41-45: ERROR:
> > fw is NULL but dereferenced.
> >
> > if procedure goto label d
On 25-03-21, 18:19, Jian Dong wrote:
> From: Jian Dong
>
> fixes coccicheck Error:
>
> drivers/staging/greybus/bootrom.c:301:41-45: ERROR:
> fw is NULL but dereferenced.
>
> if procedure goto label directly, ret will be nefative, so the fw is NULL
> and the if(condition) end with dereferen
The commit description is not clear but this patch doesn't change how
the code works, it just silences a static checker false positive.
Just ignore the false positive. Always just ignore static checkers
when they are wrong.
regards,
dan carpenter
___
From: Jian Dong
fixes coccicheck Error:
drivers/staging/greybus/bootrom.c:301:41-45: ERROR:
fw is NULL but dereferenced.
if procedure goto label directly, ret will be nefative, so the fw is NULL
and the if(condition) end with dereferenced fw. let's fix it.
Signed-off-by: Jian Dong
---
d
On Thu, Mar 25, 2021 at 06:19:26PM +0800, Jian Dong wrote:
> From: Jian Dong
>
> fixes coccicheck Error:
>
> drivers/staging/greybus/bootrom.c:301:41-45: ERROR:
> fw is NULL but dereferenced.
>
> if procedure goto label directly, ret will be nefative, so the fw is NULL
> and the if(conditi
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_bootro
On Sun, Jan 26, 2020 at 02:01:30PM +0530, Saurav Girepunje wrote:
> Fix the warning reported by cocci check.
>
> Changes:
>
> In queue_work fw dereference before it actually get assigned.
> move queue_work before gb_bootrom_set_timeout.
Nope. As I said yesterday, you need to verify the output of
Fix the warning reported by cocci check.
Changes:
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.