From patchwork Fri Nov 12 11:47:15 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samreen X-Patchwork-Id: 319642 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oACBqTSQ031557 for ; Fri, 12 Nov 2010 11:52:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757147Ab0KLLw1 (ORCPT ); Fri, 12 Nov 2010 06:52:27 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:47793 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756705Ab0KLLw1 (ORCPT ); Fri, 12 Nov 2010 06:52:27 -0500 Received: from dlep34.itg.ti.com ([157.170.170.115]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id oACBqOAb006974 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 12 Nov 2010 05:52:24 -0600 Received: from legion.dal.design.ti.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id oACBqLmi012337; Fri, 12 Nov 2010 05:52:21 -0600 (CST) Received: from localhost (graphicspc.apr.dhcp.ti.com [172.24.136.217]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id oACBqJf16266; Fri, 12 Nov 2010 05:52:19 -0600 (CST) From: Samreen To: Tomi Valkeinen Cc: linux-omap@vger.kernel.org, linux-fbdev@vger.kernel.org, Samreen Subject: [PATCH] OMAP: DSS2: OMAPFB: Fix null pointer check Date: Fri, 12 Nov 2010 17:17:15 +0530 Message-Id: <1289562435-8056-1-git-send-email-samreen@ti.com> X-Mailer: git-send-email 1.5.6.3 Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Fri, 12 Nov 2010 11:52:29 +0000 (UTC) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 6a704f1..55bed89 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -2133,6 +2133,8 @@ static int omapfb_parse_def_modes(struct omapfb2_device *fbdev) int r = 0; str = kmalloc(strlen(def_mode) + 1, GFP_KERNEL); + if (str == NULL) + return -EINVAL; strcpy(str, def_mode); options = str;