Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1551766

[PATCH] clk: qcom: Fix a possible NULL pointer dereferencing

From Vivek Gautam <vivek.gautam@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing
Date 2017-01-05 10:00 +0100
Message-ID <sWc3U-pg-13@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


Assign num_parents as 0 while registering fixed rate clocks
in _qcom_cc_register_board_clk(), to make sure the clk framework
doesn't dereference parent.

Fixes: ee15faffef11 ("clk: qcom: common: Add API to register board clocks backwards compatibly")

Cc: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Vivek Gautam <vivek.gautam@codeaurora.org>
---

Based on 'clk-next'. Build tested.

 drivers/clk/qcom/common.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/clk/qcom/common.c b/drivers/clk/qcom/common.c
index cfab7b400381..df004ead1bef 100644
--- a/drivers/clk/qcom/common.c
+++ b/drivers/clk/qcom/common.c
@@ -157,6 +157,7 @@ static int _qcom_cc_register_board_clk(struct device *dev, const char *path,
 
 		init_data.name = path;
 		init_data.ops = &clk_fixed_rate_ops;
+		init_data.num_parents = 0;
 
 		ret = devm_clk_hw_register(dev, &fixed->hw);
 		if (ret)
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] clk: qcom: Fix a possible NULL pointer dereferencing Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-01-05 10:00 +0100
  Re: [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing Andy Gross <andy.gross@linaro.org> - 2017-01-05 15:30 +0100
    Re: [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-01-05 19:30 +0100
      Re: [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing Stephen Boyd <sboyd@codeaurora.org> - 2017-01-05 23:50 +0100
        Re: [PATCH] clk: qcom: Fix a possible NULL pointer dereferencing Vivek Gautam <vivek.gautam@codeaurora.org> - 2017-01-06 06:20 +0100

csiph-web