summaryrefslogtreecommitdiff
path: root/drivers/staging/msm
diff options
context:
space:
mode:
authorVasiliy Kulikov <segoon@openwall.com>2010-11-26 20:06:53 +0300
committerGreg Kroah-Hartman <gregkh@suse.de>2010-11-29 22:38:50 +0300
commit280740a9016db986758db811bbc998acc79e5551 (patch)
tree79176e350dc05d31a85cb90df09ae58ead3f8a0f /drivers/staging/msm
parent8956110dbbb75773d851854e6e11cd8428fce71a (diff)
downloadlinux-280740a9016db986758db811bbc998acc79e5551.tar.xz
staging: msm: tvenc: fix error handling
Driver init() function should return error code. Also fix tvenc_clk leak. Signed-off-by: Vasiliy Kulikov <segoon@openwall.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/msm')
-rw-r--r--drivers/staging/msm/tvenc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/msm/tvenc.c b/drivers/staging/msm/tvenc.c
index f41c5ac22f25..4fbb77b253d3 100644
--- a/drivers/staging/msm/tvenc.c
+++ b/drivers/staging/msm/tvenc.c
@@ -279,12 +279,13 @@ static int __init tvenc_driver_init(void)
if (IS_ERR(tvenc_clk)) {
printk(KERN_ERR "error: can't get tvenc_clk!\n");
- return IS_ERR(tvenc_clk);
+ return PTR_ERR(tvenc_clk);
}
if (IS_ERR(tvdac_clk)) {
printk(KERN_ERR "error: can't get tvdac_clk!\n");
- return IS_ERR(tvdac_clk);
+ clk_put(tvenc_clk);
+ return PTR_ERR(tvdac_clk);
}
// pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ , "tvenc",