[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>
This commit is contained in:
parent
24c4942d29
commit
47efeb52f7
|
@ -625,6 +625,7 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
|
||||||
}
|
}
|
||||||
if (clk_prepare_enable(vpbe_dev->dac_clk)) {
|
if (clk_prepare_enable(vpbe_dev->dac_clk)) {
|
||||||
ret = -ENODEV;
|
ret = -ENODEV;
|
||||||
|
clk_put(vpbe_dev->dac_clk);
|
||||||
goto fail_mutex_unlock;
|
goto fail_mutex_unlock;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue