disp: msm: fix out-of-bound access and NULL dereference
Fix possible out-of-bound access and NULL pointer dereference in SDE and PLL driver. Change-Id: Ic5c34b3b4c3e983413a0351c38206cf3f3ab3b1f Signed-off-by: Samantha Tran <samtran@codeaurora.org>
这个提交包含在:
@@ -208,9 +208,12 @@ static inline int mdss_pll_get_ioresurces(struct platform_device *pdev,
|
||||
struct resource *rsc = platform_get_resource_byname(pdev,
|
||||
IORESOURCE_MEM, resource_name);
|
||||
if (rsc) {
|
||||
if (!regmap)
|
||||
return -ENOMEM;
|
||||
|
||||
*regmap = devm_ioremap(&pdev->dev,
|
||||
rsc->start, resource_size(rsc));
|
||||
if (!regmap)
|
||||
if (!*regmap)
|
||||
return -ENOMEM;
|
||||
}
|
||||
return rc;
|
||||
|
在新工单中引用
屏蔽一个用户