]> git.baikalelectronics.ru Git - kernel.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)
committerStephen Boyd <sboyd@codeaurora.org>
Tue, 5 Dec 2017 23:28:51 +0000 (15:28 -0800)
commitd0fcb61f983db4cf6fe3ecb73cdcdf35798ebecf
treebe5a439036e60b2b6a66620ba34c2e35d7a223d9
parent638fcfbb1702084a2514a4727423cf8139bc21ab
clk: fix a panic error caused by accessing NULL pointer

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: 1a4ead2bbd10 (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>
include/trace/events/clk.h