Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vasiliy Kulikov and committed by
Greg Kroah-Hartman
280740a9 8956110d

+3 -2
+3 -2
drivers/staging/msm/tvenc.c
··· 279 279 280 280 if (IS_ERR(tvenc_clk)) { 281 281 printk(KERN_ERR "error: can't get tvenc_clk!\n"); 282 - return IS_ERR(tvenc_clk); 282 + return PTR_ERR(tvenc_clk); 283 283 } 284 284 285 285 if (IS_ERR(tvdac_clk)) { 286 286 printk(KERN_ERR "error: can't get tvdac_clk!\n"); 287 - return IS_ERR(tvdac_clk); 287 + clk_put(tvenc_clk); 288 + return PTR_ERR(tvdac_clk); 288 289 } 289 290 290 291 // pm_qos_add_requirement(PM_QOS_SYSTEM_BUS_FREQ , "tvenc",