提交 280740a9 编写于 作者: V Vasiliy Kulikov 提交者: Greg Kroah-Hartman

staging: msm: tvenc: fix error handling

Driver init() function should return error code.
Also fix tvenc_clk leak.
Signed-off-by: NVasiliy Kulikov <segoon@openwall.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 8956110d
...@@ -279,12 +279,13 @@ static int __init tvenc_driver_init(void) ...@@ -279,12 +279,13 @@ static int __init tvenc_driver_init(void)
if (IS_ERR(tvenc_clk)) { if (IS_ERR(tvenc_clk)) {
printk(KERN_ERR "error: can't get tvenc_clk!\n"); 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)) { if (IS_ERR(tvdac_clk)) {
printk(KERN_ERR "error: can't get tvdac_clk!\n"); 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", // pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ , "tvenc",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册