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:45:57 +0000 (19:45 +0100)
commit0ca40937b6e4411e0913258489a13cb654581e86
tree63a938a0c89f8db480db94ff1ed6cfb233118d68
parentc871547ec28fe1268423f2f13c3441434ab65eac
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