Skip to content

Commit

Permalink
staging: msm: tvenc: fix error handling
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Vasiliy Kulikov authored and Greg Kroah-Hartman committed Nov 29, 2010
1 parent 8956110 commit 280740a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions drivers/staging/msm/tvenc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 280740a

Please sign in to comment.