Re: [PATCH] bus: fsl-mc: fix invalid free in fsl_mc_device_add

2020-07-09 Thread Greg KH
On Wed, Jul 08, 2020 at 11:45:24AM -0700, t...@redhat.com wrote: > From: Tom Rix > > clang static analysis flags this error > > fsl-mc-bus.c:695:2: warning: Attempt to free released memory [unix.Malloc] > kfree(mc_dev); > ^ > > The problem block of code is > >

[PATCH] bus: fsl-mc: fix invalid free in fsl_mc_device_add

2020-07-08 Thread trix
From: Tom Rix clang static analysis flags this error fsl-mc-bus.c:695:2: warning: Attempt to free released memory [unix.Malloc] kfree(mc_dev); ^ The problem block of code is mc_bus = kzalloc(sizeof(*mc_bus), GFP_KERNEL); if (!mc_bus)