From patchwork Fri Jan 29 00:09:12 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Insu Yun X-Patchwork-Id: 8155381 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A7443BEEE5 for ; Fri, 29 Jan 2016 01:19:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id DBCD8201CD for ; Fri, 29 Jan 2016 01:19:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id AD94F20361 for ; Fri, 29 Jan 2016 01:19:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D86F26E8EF; Thu, 28 Jan 2016 17:19:08 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f177.google.com (mail-yk0-f177.google.com [209.85.160.177]) by gabe.freedesktop.org (Postfix) with ESMTPS id 581416E02F for ; Thu, 28 Jan 2016 16:06:34 -0800 (PST) Received: by mail-yk0-f177.google.com with SMTP id r207so7612106ykd.2 for ; Thu, 28 Jan 2016 16:06:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=oti7frprfzeY6EgPr3295MyrvUNTgowfBzNh/yedvrw=; b=Uv6wqbIZyKD0bUV4e/mNEkvlqaFDvq+nko+ZvKtoRVR4yaG1EDYDv/mrgtjb1UX/32 tuhZdWYlOpS331ESmzGsQp92NliKBUATiTi9Srmg38J1wE6/swjkCVhp5r4bFRyw6M8D snC8g4/Ra2c9Ymumg6UZtJ11hbmtw/ZRmLR9NYB1bRDYWKnXrjFkgbS3zMX1JwzlznXD aq4LQAFHfej5fofUkYJ09u6EEPdDSMv/ingJsi8pIb5Og5jzKGXjfgrx2+4FegAghEy7 fpHXB9gkxrIlgltR2/roii+UMvLmmA8xg1ewxXvVkV6ZjvhOPCELa4i4Vxbn4MBKw/lx fvnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=oti7frprfzeY6EgPr3295MyrvUNTgowfBzNh/yedvrw=; b=VZJBjiYJshQxIb7VXD1EsHHK8Me3yDSQhdLK1exZbL6JdtM0HaPFvM1zffhFnDBIBU PZE5uMiwoSPgFfKj9UnsLyF0ahp9gjlaMbq7jS+LG1BiNn0EzuFqLnbeFpuVeCme3PU6 XC3iC2ifKyZQ8sL9yqLEIdat8U8TzJjOCDqGrsPpVr96ALNVpah6O+P3HDtGfvLUTmBa OyA1PDTplNM5HcQaQ7Yz/CcBbaJETTKsXnC9e3RQYd9gvTHAKuGm/MiZBR8HM66OcHfk YYbynfJ/bAFt9vjnWNDECZlGAS9+/0NWkW89pdtaKfa5t71/GGX22pnh+L2FEUQvV4SK yNTg== X-Gm-Message-State: AG10YOQ9CLJ5T/8PttUbrgTyRxVqAx/nYzcM/UEpN5upA9onUXDUb2rVxSueWe/Il84IYg== X-Received: by 10.13.231.5 with SMTP id q5mr3101061ywe.33.1454025993695; Thu, 28 Jan 2016 16:06:33 -0800 (PST) Received: from insu.gtisc.gatech.edu (insu.gtisc.gatech.edu. [143.215.130.94]) by smtp.gmail.com with ESMTPSA id w82sm10282341ywc.29.2016.01.28.16.06.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jan 2016 16:06:33 -0800 (PST) From: Insu Yun To: airlied@linux.ie, bskeggs@redhat.com, daniel.vetter@ffwll.ch, ville.syrjala@linux.intel.com, maarten.lankhorst@linux.intel.com, treding@nvidia.com, acourbot@nvidia.com, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] nouveau: need to handle failed allocation Date: Thu, 28 Jan 2016 19:09:12 -0500 Message-Id: <1454026152-5644-1-git-send-email-wuninsu@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Thu, 28 Jan 2016 17:19:04 -0800 Cc: yeongjin.jang@gatech.edu, taesoo@gatech.edu, insu@gatech.edu, Insu Yun , changwoo@gatech.edu X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP drm_property_create_range can be failed in memory pressure. So, it needs to be handled. Signed-off-by: Insu Yun --- 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