From: Alexandre Courbot Date: Tue, 15 Jul 2014 01:36:11 +0000 (+0900) Subject: drm/nve4/graph: do not crash if no power device present X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=25856c0b04fd9ea616acaf3318d0db1cd70bb00a;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git drm/nve4/graph: do not crash if no power device present Detect and workaround the absence of a power device so chips that do not feature one (e.g. GK20A) can still use this driver. Signed-off-by: Alexandre Courbot Signed-off-by: Ben Skeggs --- diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c b/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c index 1ba6666da4e5..fb9cb929320d 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nve4.c @@ -203,7 +203,8 @@ nve4_graph_init(struct nouveau_object *object) int gpc, tpc, rop; int ret, i; - ppwr->pgob(ppwr, false); + if (ppwr) + ppwr->pgob(ppwr, false); ret = nouveau_graph_init(&priv->base); if (ret)