From patchwork Mon Nov 19 05:10:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tushar Behera X-Patchwork-Id: 1762571 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 950E23FCDE for ; Mon, 19 Nov 2012 05:16:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752160Ab2KSFQY (ORCPT ); Mon, 19 Nov 2012 00:16:24 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:43252 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751395Ab2KSFQX (ORCPT ); Mon, 19 Nov 2012 00:16:23 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so586716dak.19 for ; Sun, 18 Nov 2012 21:16:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=1GHftd6CWaYUk222Y1dUsykcBbaSYWyAZTuLJfZs4U0=; b=en57YlXlNQsnxXd4fFNh/totNROqxMVurrG6QnsWoHU5jkLlaOGJEjBMV98AEqy/vT OYRj2UJm6+RaLbteVdntOuvL9FiKQdx/MuosDHO3XTWKr8HDnlweyK9mr1F73USQOSmJ 7xu0GdydcKPkBZvSjUi+9sPtCC9lXGJ3jMMubyDdLUeeKr9FB673jsJ/N7kivoQivbgQ PruRPcLaEgKs2GrnCoITxVTtzE/XWNSz7mHOPwD0nMHPT6clBXHMfwDoRXad5v/Zxddn +HTSUBkc0fhDguMYMckNVnr9h3rR4t+FFfuVueyOC0rHL7wudfMMKRZIJp20EgA/JDFS ZEsA== Received: by 10.68.245.167 with SMTP id xp7mr36529238pbc.75.1353302182883; Sun, 18 Nov 2012 21:16:22 -0800 (PST) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id i4sm5527479pav.20.2012.11.18.21.16.19 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 18 Nov 2012 21:16:21 -0800 (PST) From: Tushar Behera To: linux-omap@vger.kernel.org Cc: archit@ti.com, patches@linaro.org, tomi.valkeinen@ti.com Subject: [PATCH] OMAPDSS: OMAPFB: Fix possible null pointer dereferencing Date: Mon, 19 Nov 2012 10:40:15 +0530 Message-Id: <1353301815-21277-1-git-send-email-tushar.behera@linaro.org> X-Mailer: git-send-email 1.7.4.1 X-Gm-Message-State: ALoCoQmM/hOx2OJQHC6yqOxWNoSExXm+rVfuEAD7koZZ2oMDcvBBt+5SpxhFzQJkSzVXmRVPF/5a Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org If display is NULL, display->output would lead to kernel panic. Signed-off-by: Tushar Behera --- drivers/video/omap2/omapfb/omapfb-ioctl.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/omap2/omapfb/omapfb-ioctl.c b/drivers/video/omap2/omapfb/omapfb-ioctl.c index 55a39be..532a31b 100644 --- a/drivers/video/omap2/omapfb/omapfb-ioctl.c +++ b/drivers/video/omap2/omapfb/omapfb-ioctl.c @@ -787,7 +787,7 @@ int omapfb_ioctl(struct fb_info *fbi, unsigned int cmd, unsigned long arg) case OMAPFB_WAITFORVSYNC: DBG("ioctl WAITFORVSYNC\n"); - if (!display && !display->output && !display->output->manager) { + if (!display || !display->output || !display->output->manager) { r = -EINVAL; break; }