diff options
author | Sudip Mukherjee <sudipm.mukherjee@gmail.com> | 2014-11-06 10:04:27 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-11-11 08:48:21 -0200 |
commit | 47efeb52f78fd37df91d13e15296f8070d549f81 (patch) | |
tree | 1371b1a43ee342b7f04494a4d65979d19ff99e00 /drivers/media/platform | |
parent | 24c4942d29c8b7ae344d094495019b5587275490 (diff) | |
download | op-kernel-dev-47efeb52f78fd37df91d13e15296f8070d549f81.zip op-kernel-dev-47efeb52f78fd37df91d13e15296f8070d549f81.tar.gz |
[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 <sudip@vectorindia.org>
Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform')
-rw-r--r-- | drivers/media/platform/davinci/vpbe.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c index 49d2de0..e5df991 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; } } |