Merge "msm: pcie: correct size of local PCIe clock frequency buffer"

This commit is contained in:
Linux Build Service Account 2016-09-02 13:52:11 -07:00 committed by Gerrit - the friendly Code Review server
commit b11aa41c03

View file

@ -3921,8 +3921,8 @@ static int msm_pcie_get_resources(struct msm_pcie_dev_t *dev,
cnt = of_property_count_strings((&pdev->dev)->of_node, cnt = of_property_count_strings((&pdev->dev)->of_node,
"clock-names"); "clock-names");
if (cnt > 0) { if (cnt > 0) {
clkfreq = kzalloc(cnt * sizeof(*clkfreq), clkfreq = kzalloc((MSM_PCIE_MAX_CLK + MSM_PCIE_MAX_PIPE_CLK) *
GFP_KERNEL); sizeof(*clkfreq), GFP_KERNEL);
if (!clkfreq) { if (!clkfreq) {
PCIE_ERR(dev, "PCIe: memory alloc failed for RC%d\n", PCIE_ERR(dev, "PCIe: memory alloc failed for RC%d\n",
dev->rc_idx); dev->rc_idx);