mtd: rawnand: tango: Fix struct clk memory leak
authorMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
Thu, 5 Apr 2018 12:57:59 +0000 (14:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 1 May 2018 19:58:19 +0000 (12:58 -0700)
commit6840b774dc4d211ac546af5a2e02bb02fad0b162
tree6659acee3d67b968d4d77bcb7df54fbebcda1b62
parentf69cd2d30a800776f241b3ea16279628fc4dd724
mtd: rawnand: tango: Fix struct clk memory leak

commit 007b4e8b705a4eff184d567c5a8b496622f9e116 upstream.

Use devm_clk_get() to let Linux manage struct clk memory.

Fixes: 6956e2385a16 ("add tango NAND flash controller support")
Cc: stable@vger.kernel.org
Reported-by: Xidong Wang <wangxidong_97@163.com>
Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/mtd/nand/tango_nand.c