From patchwork Tue Sep 18 11:38:00 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 1472141 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id DD6C8DF24C for ; Tue, 18 Sep 2012 11:41:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932710Ab2IRLlg (ORCPT ); Tue, 18 Sep 2012 07:41:36 -0400 Received: from mail-pb0-f46.google.com ([209.85.160.46]:48585 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932696Ab2IRLlg (ORCPT ); Tue, 18 Sep 2012 07:41:36 -0400 Received: by mail-pb0-f46.google.com with SMTP id rr13so10904970pbb.19 for ; Tue, 18 Sep 2012 04:41:35 -0700 (PDT) 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:in-reply-to:references :x-gm-message-state; bh=5nK6kkiihn6aKV9bbli3nYsSJ+EhG997YEZphnQHsLM=; b=RjDliu32YTuT2m32jyYXZmd2/7KlldpiPTaPfka1eeR0jdMN6dN1nVcxX1fI2Wu2gi epsPsyBEqmRilhBBENJuO39mWdQ9zan4Oo8RS/nsFLKYPmNk40LyrgTGMdytDgRDkYFQ NAuQjANFbrk9ReWyEtBAgwvn1cWQDTkuKuCDJ/AwCw16ItxT7NhxUPsyK2N+8QNZ3b4H qcHVg5Xak1c1URMYeVuzxcDImh+H08bbox/HuDEstw/OVM0weDW4uSYjQpT7c/712baf mdrUaAeRHLm/+i0hHUrMwRoZlBZZoAAC/LKF9ucFbgyS5zyTb5GX6ewyak1wxTJH1X6F 6Q9w== Received: by 10.68.189.161 with SMTP id gj1mr932934pbc.21.1347968495778; Tue, 18 Sep 2012 04:41:35 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id pk9sm8534887pbb.4.2012.09.18.04.41.32 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 04:41:35 -0700 (PDT) From: Sachin Kamat To: linux-fbdev@vger.kernel.org Cc: inki.dae@samsung.com, dh09.lee@samsung.com, FlorianSchandinat@gmx.de, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 2/2] video: exynos_mipi_dsi: Fix potential NULL pointer dereference Date: Tue, 18 Sep 2012 17:08:00 +0530 Message-Id: <1347968280-22343-2-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1347968280-22343-1-git-send-email-sachin.kamat@linaro.org> References: <1347968280-22343-1-git-send-email-sachin.kamat@linaro.org> X-Gm-Message-State: ALoCoQlAapa8XA4kzR7LWmU0h//l67mxl4fhnrBvSygTybIHzHpGWF/2kw4p32GIcywrDsClXsp0 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org The error message printed when dsim is NULL references its member. This will cause NULL pointer derefernce error. Hence change dev_err to pr_err to avoid it. Signed-off-by: Sachin Kamat --- drivers/video/exynos/exynos_mipi_dsi_common.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/video/exynos/exynos_mipi_dsi_common.c b/drivers/video/exynos/exynos_mipi_dsi_common.c index 7cc4113..4fc64c4 100644 --- a/drivers/video/exynos/exynos_mipi_dsi_common.c +++ b/drivers/video/exynos/exynos_mipi_dsi_common.c @@ -80,7 +80,7 @@ irqreturn_t exynos_mipi_dsi_interrupt_handler(int irq, void *dev_id) unsigned int intsrc, intmsk; if (dsim == NULL) { - dev_err(dsim->dev, "%s: wrong parameter\n", __func__); + pr_err("%s: wrong parameter\n", __func__); return IRQ_NONE; }