From 47efeb52f78fd37df91d13e15296f8070d549f81 Mon Sep 17 00:00:00 2001 From: Sudip Mukherjee Date: Thu, 6 Nov 2014 10:04:27 -0300 Subject: [media] media: davinci: vpbe: missing clk_put we are getting struct clk using clk_get before calling clk_prepare_enable. but if clk_prepare_enable fails, then we are jumping to fail_mutex_unlock where we are just unlocking the mutex, but we are not freeing the clock source. this patch just adds a call to clk_put before jumping to fail_mutex_unlock. Signed-off-by: Sudip Mukherjee Acked-by: Lad, Prabhakar Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/davinci/vpbe.c | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/media/platform/davinci/vpbe.c') diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 49d2de0eea2d..e5df9916b2a1 100644 --- a/drivers/media/platform/davinci/vpbe.c +++ b/drivers/media/platform/davinci/vpbe.c @@ -625,6 +625,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev) } if (clk_prepare_enable(vpbe_dev->dac_clk)) { ret = -ENODEV; + clk_put(vpbe_dev->dac_clk); goto fail_mutex_unlock; } } -- cgit v1.2.3