MLK-11911-4 mxc IPUv3: pixel clk: Free di_div clk memory if clk_regiser fails
authorLiu Ying <Ying.Liu@freescale.com>
Thu, 26 Nov 2015 08:30:08 +0000 (16:30 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Mon, 19 Mar 2018 19:49:17 +0000 (14:49 -0500)
commit3d9943b693a42be378b713ebbd69a60d1f2ec88b
tree8077b5e844cc0855dc15b3875735529dfbdbee68
parenta632fdc9c28dd37f01b7e6dcfc16b54d6d304eb8
MLK-11911-4 mxc IPUv3: pixel clk: Free di_div clk memory if clk_regiser fails

This patch fixes the following issue reported by Coverity:
if (IS_ERR(clk))
freed_arg: kfree frees clk. [Note: The source code implementation of the
function has been overridden by a builtin model.]
kfree(clk);

Use after free (USE_AFTER_FREE)
use_after_free: Using freed pointer clk.
return clk;

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
drivers/mxc/ipu3/ipu_pixel_clk.c