lkml.org 
[lkml]   [2020]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: drivers/net/ethernet/freescale/gianfar.c:580 gfar_parse_group() warn: 'grp->regs' not released on lines: 517.
On Tue, Nov 17, 2020 at 01:41:15AM +0000, Leo Li wrote:
> > ee873fda3bec7c6 drivers/net/ethernet/freescale/gianfar.c Claudiu Manoil
> > 2013-01-29 513 gfar_irq(grp, ER)->irq =
> > irq_of_parse_and_map(np, 2);
> > fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown
> > 2015-11-26 514 if (!gfar_irq(grp, TX)->irq ||
> > fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown
> > 2015-11-26 515 !gfar_irq(grp, RX)->irq ||
> > fea0f6650979a4f drivers/net/ethernet/freescale/gianfar.c Mark Brown
> > 2015-11-26 516 !gfar_irq(grp, ER)->irq)
> > 46ceb60ca80fa07 drivers/net/gianfar.c Sandeep Gopalpet 2009-11-
> > 02 517 return -EINVAL;
> >
> > This should unmap "grp->regs".
>
> This variable is unmapped in the caller with a wholesale cleanup function unmap_group_regs(). Probably a false positive for smatch?
>

Yeah. Thanks. Smatch doesn't consider that the variable might be freed
in the caller.

regards,
dan carpenter

\
 
 \ /
  Last update: 2020-11-17 08:17    [W:0.076 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site