Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Greg KH
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: > > > > > >

Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Jian Dong
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

Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Viresh Kumar
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

Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Dan Carpenter
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

Re: [PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Greg KH
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

[PATCH] staging: greybus: fix fw is NULL but dereferenced

2021-03-25 Thread Jian Dong
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 ---