clk: boston: fix possible memory leak in clk_boston_setup()
authorYi Wang <wang.yi59@zte.com.cn>
Wed, 31 Oct 2018 07:41:41 +0000 (15:41 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 12 Feb 2019 18:46:58 +0000 (19:46 +0100)
commit0d041add1ba0eeff10cba181ecae48845f940280
tree092da2ca9e42cadfe7a642a74918d3608b5916c6
parent4660207706ca8b7f30dee8550ec48e02b048a558
clk: boston: fix possible memory leak in clk_boston_setup()

[ Upstream commit 46fda5b5067a391912cf73bf3d32c26b6a22ad09 ]

Smatch report warnings:
drivers/clk/imgtec/clk-boston.c:76 clk_boston_setup() warn: possible memory leak of 'onecell'
drivers/clk/imgtec/clk-boston.c:83 clk_boston_setup() warn: possible memory leak of 'onecell'
drivers/clk/imgtec/clk-boston.c:90 clk_boston_setup() warn: possible memory leak of 'onecell'

'onecell' is malloced in clk_boston_setup(), but not be freed
before leaving from the error handling cases.

Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/imgtec/clk-boston.c