[media] davinci: vpbe: fix missing unlock on error in vpbe_initialize()
Commit Message
From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Add the missing unlock on the error handling path in function
vpbe_initialize().
Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
---
no test
---
drivers/media/platform/davinci/vpbe.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Comments
Hi Wei,
Thanks for the patch.
On Mon, Oct 22, 2012 at 11:06 AM, Wei Yongjun <weiyj.lk@gmail.com> wrote:
> From: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
>
> Add the missing unlock on the error handling path in function
> vpbe_initialize().
>
> Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Acked-by: Prabhakar Lad <prabhakar.lad@ti.com>
> ---
> no test
> ---
> drivers/media/platform/davinci/vpbe.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/platform/davinci/vpbe.c b/drivers/media/platform/davinci/vpbe.c
> index 69d7a58..875e63d 100644
> --- a/drivers/media/platform/davinci/vpbe.c
> +++ b/drivers/media/platform/davinci/vpbe.c
> @@ -632,8 +632,10 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
>
> err = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev,
> platform_device_get);
> - if (err < 0)
> - return err;
> + if (err < 0) {
> + ret = err;
> + goto fail_dev_unregister;
> + }
>
> vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev,
> vpbe_dev->cfg->venc.module_name);
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
@@ -632,8 +632,10 @@ static int vpbe_initialize(struct device *dev, struct vpbe_device *vpbe_dev)
err = bus_for_each_dev(&platform_bus_type, NULL, vpbe_dev,
platform_device_get);
- if (err < 0)
- return err;
+ if (err < 0) {
+ ret = err;
+ goto fail_dev_unregister;
+ }
vpbe_dev->venc = venc_sub_dev_init(&vpbe_dev->v4l2_dev,
vpbe_dev->cfg->venc.module_name);