Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1321165 > unrolled thread

[PATCH] nouveau: need to handle failed allocation

Started byInsu Yun <wuninsu@gmail.com>
First post2016-01-29 01:10 +0100
Last post2016-01-29 01:10 +0100
Articles 1 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH] nouveau: need to handle failed allocation Insu Yun <wuninsu@gmail.com> - 2016-01-29 01:10 +0100

#1321165 — [PATCH] nouveau: need to handle failed allocation

FromInsu Yun <wuninsu@gmail.com>
Date2016-01-29 01:10 +0100
Subject[PATCH] nouveau: need to handle failed allocation
Message-ID<qW4Nt-2NZ-11@gated-at.bofh.it>
drm_property_create_range can be failed in memory pressure.
So, it needs to be handled.

Signed-off-by: Insu Yun <wuninsu@gmail.com>
---
 drivers/gpu/drm/nouveau/nouveau_display.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index 24be27d..26b4902 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -443,6 +443,12 @@ nouveau_display_create_properties(struct drm_device *dev)
 	/* -100..+100 */
 	disp->color_vibrance_property =
 		drm_property_create_range(dev, 0, "color vibrance", 0, 200);
+
+	if (!disp->underscan_hborder_property ||
+			!disp->underscan_vborder_property ||
+			!disp->vibrant_hue_property ||
+			!disp->color_vibrance_property)
+		return;
 }
 
 int
-- 
1.9.1

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web