]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
zynqmp: phy-zynqmp: Free the nvmem consumer buffer
authorNava kishore Manne <nava.manne@xilinx.com>
Thu, 16 Feb 2017 16:28:21 +0000 (21:58 +0530)
committerMichal Simek <michal.simek@xilinx.com>
Fri, 17 Feb 2017 07:43:46 +0000 (08:43 +0100)
nvmem_cell_read() allocate the consumer requested amount of
buffer.This buffer needs  to be free by the consumer driver
after usage.

This patch fix this issue.

Signed-off-by: Nava kishore Manne <navam@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/phy/phy-zynqmp.c

index 7f2d3d1526c4f11ddb7d454645f969d8b303ba25..fe1125acca30f1aca1526c2b0ff05efa1fb9dc9e 100644 (file)
@@ -37,6 +37,7 @@
 #include <linux/soc/xilinx/zynqmp/pm.h>
 #include <linux/reset.h>
 #include <linux/list.h>
+#include <linux/slab.h>
 
 #define MAX_LANES                      4
 
@@ -1322,7 +1323,7 @@ static int xpsgtr_probe(struct platform_device *pdev)
                dev_err(&pdev->dev, "registering provider failed\n");
                        return PTR_ERR(provider);
        }
-
+       kfree(soc_rev);
        return 0;
 }