clk/ti/adpll: allocate room for terminating null
authorStephen Kitt <steve@sk2.org>
Sat, 19 Oct 2019 14:06:34 +0000 (16:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:12:28 +0000 (13:12 +0200)
commit1ea69d11ec0af940b76c69eb14cff53a5f1d4166
tree1b183f92d0da2bd84cd6a43f14a5423feb0536a5
parente12910cd450438fe90ae239e33556262bae6e953
clk/ti/adpll: allocate room for terminating null

[ Upstream commit 7f6ac72946b88b89ee44c1c527aa8591ac5ffcbe ]

The buffer allocated in ti_adpll_clk_get_name doesn't account for the
terminating null. This patch switches to devm_kasprintf to avoid
overflowing.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Link: https://lkml.kernel.org/r/20191019140634.15596-1-steve@sk2.org
Acked-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/clk/ti/adpll.c