Avoid NULL dev_priv->vlv_pctx-> deref in a WARN check on Lenovo B50-30,

add an additional check for the NULL dev_priv->vlv_pctx.
System now boots (though does not recognise any of the USB(3) ports)
pullup#7
This commit is contained in:
abs 2015-07-26 15:30:36 +00:00
parent 382f8944d9
commit df80c91dd1
1 changed files with 2 additions and 0 deletions

View File

@ -3625,6 +3625,8 @@ static void valleyview_check_pctx(struct drm_i915_private *dev_priv)
{ {
unsigned long pctx_addr = I915_READ(VLV_PCBR) & ~4095; unsigned long pctx_addr = I915_READ(VLV_PCBR) & ~4095;
if (WARN_ON(!dev_priv->vlv_pctx))
return;
WARN_ON(pctx_addr != dev_priv->mm.stolen_base + WARN_ON(pctx_addr != dev_priv->mm.stolen_base +
dev_priv->vlv_pctx->stolen->start); dev_priv->vlv_pctx->stolen->start);
} }