media: video: tegra: avp: add kfree to error routine.
Jubeom Kim [Wed, 22 Jun 2011 13:03:05 +0000 (22:03 +0900)]
Needs kfree function when error occurs.

Reviewed-on: http://git-master/r/37859
(cherry picked from commit 26c98cb216294230f5cc46055c48a0224989df80)

Original-Change-Id: Ic83407628eb6e4c2aad0ba014f5a97b561b3ecf6
Reviewed-on: http://git-master/r/38449
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>

Rebase-Id: R56e7aec023b2482e51fa4d79e7945382e49304b6

drivers/media/video/tegra/avp/avp_svc.c

index a8bfdcf..0c22530 100644 (file)
@@ -771,6 +771,7 @@ err_get_clks:
                clk_put(avp_svc->sclk);
        if (!IS_ERR_OR_NULL(avp_svc->emcclk))
                clk_put(avp_svc->emcclk);
+       kfree(avp_svc);
 err_alloc:
        return ERR_PTR(ret);
 }