mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-16 17:23:55 +08:00
soc: fsl: dpio: cleanup the cpu array on dpaa2_io_down
The dpio_by_cpu array should not contain a reference to a freed dpaa2_io object. This patch adds the necessary cleanup in dpaa2_io_down. Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com> Signed-off-by: Li Yang <leoyang.li@nxp.com>
This commit is contained in:
parent
bfeffd1552
commit
e181a569d8
@ -160,6 +160,11 @@ struct dpaa2_io *dpaa2_io_create(const struct dpaa2_io_desc *desc)
|
||||
*/
|
||||
void dpaa2_io_down(struct dpaa2_io *d)
|
||||
{
|
||||
spin_lock(&dpio_list_lock);
|
||||
dpio_by_cpu[d->dpio_desc.cpu] = NULL;
|
||||
list_del(&d->node);
|
||||
spin_unlock(&dpio_list_lock);
|
||||
|
||||
kfree(d);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user