From patchwork Fri Jan 29 00:05:16 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Insu Yun X-Patchwork-Id: 8155361 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 33FBF9F818 for ; Fri, 29 Jan 2016 01:19:08 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B440F20375 for ; Fri, 29 Jan 2016 01:19:06 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BAB18201CD for ; Fri, 29 Jan 2016 01:19:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0043E6E8EB; Thu, 28 Jan 2016 17:19:05 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C3516E057 for ; Thu, 28 Jan 2016 16:02:39 -0800 (PST) Received: by mail-yk0-f171.google.com with SMTP id r207so7517569ykd.2 for ; Thu, 28 Jan 2016 16:02:39 -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=dgFvWxNhHceXQ+F4cEW58kpHf/2+vtwx9e1F80lE8GE=; b=pNvWwSrZqljWRNi6jJPWGaLif7g5rg0F9ZsAbbiXX7lHfmdUHAwCjxURBUoUIjsiWE nbgwZqQSSa6jcDIoFERYljC+KHS3fCIJtPaXpMWGxAUrgj660VHkxQ2SCCtm5La+I4Hv W2OoDVeO7OJt7rkXX3yijdx3DT0YuLG2TsIjPQNzPyMmclSRi3ZYk7B7TDg0qjF8tZnQ aDQ+gQHZVSkAToI50b5wImonOFRyOhVXEFBVdy2myrXjwPtcdQl/CYMDcfKJ7b6q8Hvq tDGFV0Rr8v3oz5ErnKHV/cqOlFW0BahHtOg0O40fYOzDrOS+JdEmH78bhfhz9RJpBJfL qR9g== 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=dgFvWxNhHceXQ+F4cEW58kpHf/2+vtwx9e1F80lE8GE=; b=gYwPdLG4MjmkNV4lbMcXR7NIg6m5XPnR3lBfpZG/UjempS8VuPNOHbZhYvgd+LdD+H 2f5JF2U0xA7BlW6aHJpJWU7DSNtYZQii91/0lEjDTH7mPAP2lGb7k9uKcI4l0m+YzMjI cZfT4FR+NBdGtDT8tOdfA1D3qEHOjOUhflyDJALThwPxN9Udee6mL43IijjIAaDcFkJN zKG4jO0vuHWhA7eaVoVcY8OHzi/7oz5YCpIfC1CN3nj4rP7DYXPHPIYNt7emjkEstFPG hu0kloFIexCp8hg3Zafuqw+F6iATNBO0h/5uyho6AzVq5ZL+Tq0bJ+hGoxCIUiZ5YiPD G4vQ== X-Gm-Message-State: AG10YOTTNS1FYhvuhcord0p0EgKoAKrT567HAcWk2lsF0PiBxhCCAeBd4uvxfG2fOxJm6w== X-Received: by 10.13.195.5 with SMTP id f5mr3402669ywd.321.1454025758225; Thu, 28 Jan 2016 16:02:38 -0800 (PST) Received: from insu.gtisc.gatech.edu (insu.gtisc.gatech.edu. [143.215.130.94]) by smtp.gmail.com with ESMTPSA id 204sm10215476ywr.32.2016.01.28.16.02.37 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 28 Jan 2016 16:02:37 -0800 (PST) From: Insu Yun To: patrik.r.jakobsson@gmail.com, airlied@linux.ie, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] gma500: handling failed allocation Date: Thu, 28 Jan 2016 19:05:16 -0500 Message-Id: <1454025916-5218-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 Since drm_property_create_range can be failed in memory pressure, it needs to be handled. Signed-off-by: Insu Yun --- drivers/gpu/drm/gma500/framebuffer.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/gma500/framebuffer.c b/drivers/gpu/drm/gma500/framebuffer.c index cb95765..31085e4 100644 --- a/drivers/gpu/drm/gma500/framebuffer.c +++ b/drivers/gpu/drm/gma500/framebuffer.c @@ -683,6 +683,8 @@ static int psb_create_backlight_property(struct drm_device *dev) return 0; backlight = drm_property_create_range(dev, 0, "backlight", 0, 100); + if (!backlight) + return -ENOMEM; dev_priv->backlight_property = backlight;