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: 11499 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 743F723E01 for ; Tue, 18 Sep 2012 11:41:37 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id D23633D096E5 for ; Tue, 18 Sep 2012 11:41:36 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id k11so10715711iea.11 for ; Tue, 18 Sep 2012 04:41:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=5nK6kkiihn6aKV9bbli3nYsSJ+EhG997YEZphnQHsLM=; b=H8bHmSmykD+afHEAwdP0zuIXG8OM5vfXGyuZCqmNu6XZPIY2N4qYYCXT2Wgy6ey6Wb EB67ou6GJx9/W/KeaRZFOGh49gk1lxlqxoPBBG2cdAgcnLS5V1iOCNhgAd+rlZeqlITD QeJuCWxbGWzwVF4yP3TIi8gMy/kGOciVnraYYRK1edMcIXKZLF75DNLd1DsyK4bB/QPc OU+7EG+K58rBNwJVvi1VLJh0/n/1hdCSPfP5r61pO84nOWx+e2rh6siXrhy2Dix0zfyv 3Efs88FWxIS9WPGTq3IhVeL3eVo8Xwm48SCjEohKEI4mWNMUbcyuFXsnYKWsybXpjhYy FMkQ== Received: by 10.42.60.139 with SMTP id q11mr11608785ich.53.1347968496584; Tue, 18 Sep 2012 04:41:36 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.184.232 with SMTP id ex8csp368918igc; Tue, 18 Sep 2012 04:41:36 -0700 (PDT) Received: by 10.68.210.207 with SMTP id mw15mr812534pbc.81.1347968496019; Tue, 18 Sep 2012 04:41:36 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id px5si19882277pbb.262.2012.09.18.04.41.35 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 18 Sep 2012 04:41:36 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by mail-pb0-f50.google.com with SMTP id md12so12486310pbc.37 for ; Tue, 18 Sep 2012 04:41:35 -0700 (PDT) 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: ALoCoQkKIi2qHl6gJILSOix2svHkryHK5lQW2r2hatTrR7pobFUpRU8Y8rmgwUhepBY13xBFN5kx 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; }