mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-10 06:09:23 -04:00
USB: phy-msm-qusb: Set ref_clk_src to NULL if clk_get fails
Set ref_clk_src to NULL if clk_get() API fails to get handle in probe(), else it results in invalid pointer derefernce. Change-Id: I1ba5f64bc2a691923cbac1c7b4e9288b6071ff57 Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
This commit is contained in:
parent
aa6d7ed77f
commit
5455109dc4
1 changed files with 3 additions and 1 deletions
|
|
@ -999,8 +999,10 @@ static int qusb_phy_probe(struct platform_device *pdev)
|
|||
}
|
||||
|
||||
qphy->ref_clk_src = devm_clk_get(dev, "ref_clk_src");
|
||||
if (IS_ERR(qphy->ref_clk_src))
|
||||
if (IS_ERR(qphy->ref_clk_src)) {
|
||||
qphy->ref_clk_src = NULL;
|
||||
dev_dbg(dev, "clk get failed for ref_clk_src\n");
|
||||
}
|
||||
|
||||
/* ref_clk is needed only for DIFF_CLK case, hence make it optional. */
|
||||
if (of_property_match_string(pdev->dev.of_node,
|
||||
|
|
|
|||
Loading…
Reference in a new issue