Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e181a569 authored by Ioana Ciornei's avatar Ioana Ciornei Committed by Li Yang
Browse files

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: default avatarIoana Ciornei <ioana.ciornei@nxp.com>
Signed-off-by: default avatarLi Yang <leoyang.li@nxp.com>
parent bfeffd15
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
}