From patchwork Thu May 20 14:29:51 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: manjugk manjugk X-Patchwork-Id: 101197 X-Patchwork-Delegate: tomi.valkeinen@nokia.com Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o4KEUkod020610 for ; Thu, 20 May 2010 14:30:46 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755120Ab0ETOab (ORCPT ); Thu, 20 May 2010 10:30:31 -0400 Received: from arroyo.ext.ti.com ([192.94.94.40]:56263 "EHLO arroyo.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755075Ab0ETOa1 (ORCPT ); Thu, 20 May 2010 10:30:27 -0400 Received: from dbdp31.itg.ti.com ([172.24.170.98]) by arroyo.ext.ti.com (8.13.7/8.13.7) with ESMTP id o4KEUNSb013272 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 20 May 2010 09:30:25 -0500 Received: from localhost.localdomain (localhost [127.0.0.1]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id o4KEUK0q019679; Thu, 20 May 2010 20:00:22 +0530 (IST) From: Manjunatha GK To: linux-omap@vger.kernel.org Cc: Satish Kumar , Tony Lindgren Subject: [PATCH] OMAP: FB: Fix Null pointer check Date: Thu, 20 May 2010 19:59:51 +0530 Message-Id: <1274365792-24938-3-git-send-email-manjugk@ti.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1274365792-24938-1-git-send-email-manjugk@ti.com> References: <1274365792-24938-1-git-send-email-manjugk@ti.com> 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 (demeter.kernel.org [140.211.167.41]); Thu, 20 May 2010 14:30:46 +0000 (UTC) diff --git a/drivers/video/omap2/omapfb/omapfb-main.c b/drivers/video/omap2/omapfb/omapfb-main.c index 4b4506d..63268cf 100644 --- a/drivers/video/omap2/omapfb/omapfb-main.c +++ b/drivers/video/omap2/omapfb/omapfb-main.c @@ -1217,6 +1217,11 @@ static int omapfb_blank(int blank, struct fb_info *fbi) int do_update = 0; int r = 0; + if (display == NULL) { + printk(KERN_ERR "omapfb_blank: fb2display returned NULL\n"); + return -EINVAL; + } + omapfb_lock(fbdev); switch (blank) {