From patchwork Fri Apr 26 08:52:57 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 2491721 Return-Path: X-Original-To: patchwork-linux-media@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 D1CC9DF230 for ; Fri, 26 Apr 2013 09:05:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755892Ab3DZJFk (ORCPT ); Fri, 26 Apr 2013 05:05:40 -0400 Received: from mail-pb0-f54.google.com ([209.85.160.54]:59263 "EHLO mail-pb0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755858Ab3DZJFi (ORCPT ); Fri, 26 Apr 2013 05:05:38 -0400 Received: by mail-pb0-f54.google.com with SMTP id jt11so1088239pbb.13 for ; Fri, 26 Apr 2013 02:05:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:from:to:cc:subject:date:message-id:x-mailer :x-gm-message-state; bh=Q+sai+kk1RHdzZQwIDSNUdelIzEhAC0FoJWyifvxFQ0=; b=P15PuL3MNR587qhLGpj/TU9eNehtI3lLu5t9zN6igKhGMshDph+JSf3XLO+SiKAohj CQ6ofjMAouFD4UiQXcYh73ziy7wFKs4r1bmfF5PT27BDfaidouZBV6SFAYvwnEPyuaP/ DolGd507iam4uxf9tzFPWUpBsX7EsK3HLOzdsEjhKx5L7JdQLx2iqjTV9EeWe/wG1klD LhK5Wh9FWuEyaWwpFZTPPbaEUEU5uRROgeGjHzzSDvwCKoZWrNpCgy2V69Rnf5CVCktt MiHTww4tqMGA+Wx/TcMps1QoX1/xQCX4h/2yPpLmBz6+S9y3ZBt+obsYumuuegO3uM86 HRiw== X-Received: by 10.68.94.227 with SMTP id df3mr56869758pbb.182.1366967138323; Fri, 26 Apr 2013 02:05:38 -0700 (PDT) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id qi1sm11898513pac.21.2013.04.26.02.05.34 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 26 Apr 2013 02:05:37 -0700 (PDT) From: Sachin Kamat To: linux-media@vger.kernel.org Cc: s.nawrocki@samsung.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH v2] [media] exynos4-is: Fix potential null pointer dereference in mipi-csis.c Date: Fri, 26 Apr 2013 14:22:57 +0530 Message-Id: <1366966377-15808-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Gm-Message-State: ALoCoQk70cqy0BCx3Caz6vqqYSR7aeBLR99RYxGCmwOzWSrSO5Mw8AcYT6ir3+YLhEtr7w7b/iK3 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When 'node' is NULL, the print statement tries to dereference it. Hence replace the variable with the one that is accessible. Signed-off-by: Sachin Kamat --- Changes since v1: Used pdev->dev.of_node->full_name for node name. --- drivers/media/platform/exynos4-is/mipi-csis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos4-is/mipi-csis.c b/drivers/media/platform/exynos4-is/mipi-csis.c index a2eda9d..254d70f 100644 --- a/drivers/media/platform/exynos4-is/mipi-csis.c +++ b/drivers/media/platform/exynos4-is/mipi-csis.c @@ -746,7 +746,7 @@ static int s5pcsis_parse_dt(struct platform_device *pdev, node = v4l2_of_get_next_endpoint(node, NULL); if (!node) { dev_err(&pdev->dev, "No port node at %s\n", - node->full_name); + pdev->dev.of_node->full_name); return -EINVAL; } /* Get port node and validate MIPI-CSI channel id. */