]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
clk: fix a panic error caused by accessing NULL pointer
authorCai Li <cai.li@spreadtrum.com>
Tue, 21 Nov 2017 09:24:38 +0000 (17:24 +0800)
committerSasha Levin <alexander.levin@microsoft.com>
Sun, 4 Mar 2018 15:28:27 +0000 (10:28 -0500)
commit9ad1fd863e8205de3f54a8f24460f3bf11960901
tree2eaa31a911f5b6fe721aad2f2f4cff988cf33345
parent233c8536bf579f6908fc27c050302475afbbef75
clk: fix a panic error caused by accessing NULL pointer

[ Upstream commit 975b820b6836b6b6c42fb84cd2e772e2b41bca67 ]

In some cases the clock parent would be set NULL when doing re-parent,
it will cause a NULL pointer accessing if clk_set trace event is
enabled.

This patch sets the parent as "none" if the input parameter is NULL.

Fixes: dfc202ead312 (clk: Add tracepoints for hardware operations)
Signed-off-by: Cai Li <cai.li@spreadtrum.com>
Signed-off-by: Chunyan Zhang <chunyan.zhang@spreadtrum.com>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
include/trace/events/clk.h