mtd: lpddr: Fix a double free in probe()
authorDan Carpenter <dan.carpenter@oracle.com>
Fri, 28 Feb 2020 09:25:54 +0000 (12:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Apr 2020 08:36:45 +0000 (10:36 +0200)
commit4191ebe1fc71b6343c9d72b4de6e408c8d0b03bd
tree574e1702322038c1ae69f2f9743d3d1c22619ebe
parent7d4adb1d3c69efb1d0d90161cdea75b8dcae80a6
mtd: lpddr: Fix a double free in probe()

commit 4da0ea71ea934af18db4c63396ba2af1a679ef02 upstream.

This function is only called from lpddr_probe().  We free "lpddr" both
here and in the caller, so it's a double free.  The best place to free
"lpddr" is in lpddr_probe() so let's delete this one.

Fixes: 8dc004395d5e ("[MTD] LPDDR qinfo probing.")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
Link: https://lore.kernel.org/linux-mtd/20200228092554.o57igp3nqhyvf66t@kili.mountain
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/lpddr/lpddr_cmds.c