From patchwork Tue Dec 29 19:01:53 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Insu Yun X-Patchwork-Id: 7939511 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 9E26CBEEE5 for ; Fri, 1 Jan 2016 14:55:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AB82E205E3 for ; Fri, 1 Jan 2016 14:55:14 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id A98C1204CF for ; Fri, 1 Jan 2016 14:55:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 518776E3C1; Fri, 1 Jan 2016 06:55:10 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f195.google.com (mail-yk0-f195.google.com [209.85.160.195]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1B6126E03B; Tue, 29 Dec 2015 10:59:11 -0800 (PST) Received: by mail-yk0-f195.google.com with SMTP id y10so3746799ykf.0; Tue, 29 Dec 2015 10:59:11 -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=GvXNzZzoHVR8ohejnK8kN/5wdTIhNCXy/qQ3Cg2Gntk=; b=Im/xn48ZrjvTUjk0j9CmTQf2YteQru6rD7U7fBZ+n+r3k9YhYdsl0zxQxVSLVtmOeT IcFWGcL24Mj1QjF77XSrM/PXC0zXkg0nVx1HkkakJV35RbGja0D3MR9uY6v3LU+4Urpn xeS/NGvIcxn3UjIaF8dKtA7j7/SERmnjpsdt3wI9HTVlngY4QvnefGnudASfB09mKk2X 5q2jUF6+x7VYge/bzngKBm12deJsvbalK4BawX/tT1gnXPrLVvjfDb1Xgru77dK4xxAn mVsabOMmIRldIl9NEJRJTP4OYGsEliX5oYP2Z1SgBIt5Ua0uM/yjQjwPgiKZdwh1h58S hyBg== X-Received: by 10.129.98.86 with SMTP id w83mr46351122ywb.37.1451415550241; Tue, 29 Dec 2015 10:59:10 -0800 (PST) Received: from cutthroat.gtisc.gatech.edu (cutthroat.gtisc.gatech.edu. [128.61.240.77]) by smtp.gmail.com with ESMTPSA id n10sm15398721ywc.20.2015.12.29.10.59.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 29 Dec 2015 10:59:09 -0800 (PST) From: Insu Yun To: daniel.vetter@intel.com, jani.nikula@linux.intel.com, airlied@linux.ie, intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] i915: correctly handling failed allocation Date: Tue, 29 Dec 2015 14:01:53 -0500 Message-Id: <1451415713-9508-1-git-send-email-wuninsu@gmail.com> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Fri, 01 Jan 2016 06:55:07 -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 Signed-off-by: Insu Yun --- drivers/gpu/drm/i915/intel_dsi_panel_vbt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c index a5e99ac..4e279dd 100644 --- a/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c +++ b/drivers/gpu/drm/i915/intel_dsi_panel_vbt.c @@ -666,6 +666,8 @@ struct drm_panel *vbt_panel_init(struct intel_dsi *intel_dsi, u16 panel_id) /* This is cheating a bit with the cleanup. */ vbt_panel = devm_kzalloc(dev->dev, sizeof(*vbt_panel), GFP_KERNEL); + if (!vbt_pannel) + return NULL; vbt_panel->intel_dsi = intel_dsi; drm_panel_init(&vbt_panel->panel);